Why do the x-tick labels overlap in the histogram produced by the HIST function within MATLAB after the axes' limits change?
I am using the HIST function to produce a histogram of my data. If I specify the locations of the bin centers, then the x-tick labels sometimes overlap when I change the axes' limits. For example, if I execute the code:
x = [1 1 2 2 2 3 3 4 5 6 6 6 7 7 8 8 9];figure;hist(x,0:14);axis([0 200 0 3])
The x-tick labels overlap each other. However, if I add one more bin center location, then the x-tick labels do not overlap after changing the axes' limits:
figure;hist(x,0:15);axis([0 200 0 3]);
Best Answer