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
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com