Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

Any way to stack histograms?

Asked by Russ on 12 Oct 2012

I have 11 matrices, each that I want to pull the 9th column from it and plot a stacked histogram (each matrix would need to have a separate color associated with the histogram stack). If I can't do a stacked histogram, can I do a bar chart that would look exactly like a stacked histogram? Thanks!

0 Comments

Russ

Products

No products are associated with this question.

2 Answers

Answer by Teja Muppirala on 12 Oct 2012

Can you use the 'stacked' option, as described in the help for BAR?

bar(rand(10,5),'stacked'), colormap(cool)

0 Comments

Teja Muppirala
Answer by Keith on 18 Jan 2013
Edited by Keith on 18 Jan 2013

I am trying to solve this problem as well. I think I will have to write it myself but was hoping some part of it existed already. In principle the output should be similar to that of ROOT

http://root.cern.ch/root/html/THStack.html

0 Comments

Keith

Contact us