change the step in x label
9 views (last 30 days)
Hello, I have made histogram shown in the picture attached. As you can see, the X lable is ticked with the numbers: 95-125 with a space of 5 from each other. Is there any way(not manually) to make the spaces as 1 so that the plot will be shown automatically as : 95,96,97,...125 ? Thanks!
Wayne King on 27 Nov 2013
Use 'xtick' I'll do an example with Gaussian distributed data but I doubt you really want to space the ticks for every integer. I'll do one with a spacing of two.
x = 110+5*randn(100,1);
Just use the set() command after you call hist()