binning the x-axis of a plot
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I need to create bins for the x-axis of my plot. The axis goes from 0 to 20, and I need to make bins corresponding to every .10 of a value; i.e. 5.0 to 5.10. How would I go about doing this?
0 commentaires
Réponses (1)
Walter Roberson
le 9 Fév 2016
xbins = 0 : 0.10 : 20;
4 commentaires
Walter Roberson
le 9 Fév 2016
xbins = 0 : 0.10 : 20;
plot(r,txx2);
set(gca, 'xtick', xbins)
But what I suspect you want is something closer to
bar(r, txx2)
Voir également
Catégories
En savoir plus sur Line Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!