MATLAB: Two Bar Plots on one graph, with the bars next to each other, not on top of.

barplot

Hi guys,
As the title suggests I want to make a bar graph. I have 2 histograms and the values for xOut are the same. If I try to use hold on, or in fact plotYY, the bars are plotted directly over the top of each other. What I want is a bar plot where the bars for each bin are next to each other, and it would be nice to have them in a different colour. 🙂
Thanks in advance.
Tim

Best Answer

bar([1 2],[pi exp(1);1 4])
Related Question