Thread Subject: bar plot BaseValue

Subject: bar plot BaseValue

From: Bo

Date: 20 Nov, 2009 21:41:19

Message: 1 of 2

Hi,

I wanted to plot "bar" plot in "stack" style.
I can use BaseValue property to set specific base value.
But how can I plot each group on a different base value?

Thanks a lot!

Bo

Subject: bar plot BaseValue

From: Bo

Date: 21 Nov, 2009 13:45:10

Message: 2 of 2

I tried loop:
-------------------
% y is 20x3 matrix
% base_value is 1x20 array
for i=1:20
    bar(i, y(i, 1:3), 'stack', 'BaseValue', base_value(i));
end
-----------------
It doesn't work.
??? Error using ==> bar at 57
X must be same length as Y.

Seems can't plot bars one by one. can anybody help?
Thanks a lot!



"Bo " <seumit@163.com> wrote in message <he72dv$2c0$1@fred.mathworks.com>...
> Hi,
>
> I wanted to plot "bar" plot in "stack" style.
> I can use BaseValue property to set specific base value.
> But how can I plot each group on a different base value?
>
> Thanks a lot!
>
> Bo

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com