pac
pac

Reputation: 291

what is the differance between these plots?

I have used the following codes:

bar([c f], 0.1,'stacked');

and

 bar( [c , f ] , 1.5); 

whose results are: code1 code2

What I am confused is that the values are not the same can you explain what is happening?

is it now correct?

 bar( [c , c+f ] , 0.5);

code3

Upvotes: 0

Views: 56

Answers (1)

Peter
Peter

Reputation: 14937

The stacked version shows the first vector on the bottom, in blue, and the second vector "stacked" on top of the first, in red. The idea is that the total is the most important visual value, but you can also see the independent contributions of the inputs. So yes, the c+f plot should resemble the stacked plot, in that the bars should be the same height. The only difference is that the stacked plot shows c and f in the same bar. Is that clear?

Upvotes: 1

Related Questions