MATLAB: Histogram with two sets of data

histogramr2010a

Hello, I want to make an histogram exactly like the image here. Have you an idea ?

Best Answer

Use the bar function with the 'grouped' option. The error bars and the comparison lines between the plotted bars are a bit more difficult, and the code the plot them depends on whether you are using R2014a or earlier, or R2014b or later.