I want to change how data are distributed in the histogram that I built.My histogram looks like
But I want it to look like
I set
bins1=[10,30,50,70];
hist(data,bins1)
How can I arrange the bins as in the second figure?
Use histc
instead of hist
. histc
allows you to define the edges while hist
uses the second input parameter as centers.