Axis numbers on histogram
Mostrar comentarios más antiguos
Hello there,
I'm trying to plot a histogram plot of departure times on the 24-hour time scale.
Here is an example of what I'm trying to achieve: http://img593.imageshack.us/img593/3032/depaturetime.jpg
My question is: How can I get the x-axis to start at 5am and finish at 4am like it is in the example. When I plot it it goes from 0 - 24.
Also how could I plot the cumulative distribution over the histogram.
My code:
DepartureTimes = load('Departure Times.txt')
h = hist(DepartureTimes,24);
h = h/sum(h);
bar(h, 'DisplayName', 'Depature Times');
legend('show');
Many thanks for your help
John
Respuesta aceptada
Más respuestas (1)
Image Analyst
el 7 de En. de 2012
0 votos
Did you try xlim()?
Categorías
Más información sobre Histograms en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!