Help with axis on a plot
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Emily
le 1 Mar 2019
Réponse apportée : Yasasvi Harish Kumar
le 1 Mar 2019
I am needing to plot the function of a monthly increase in bank balance but need the x-axis in years instead of months and am wondering how to achieve this.
0 commentaires
Réponse acceptée
Yasasvi Harish Kumar
le 1 Mar 2019
Hi,
All you have to do is divide your x-axis by 12.
For example:
plot(x,y) %gives you the axis in months
Change this to,
x = x/12;
plot(x,y)
I hope that fixes your issue.
Regards
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur 2-D and 3-D 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!