Making the Y-axis a scale of a specific variable
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Thinker
le 5 Déc 2019
Réponse apportée : the cyclist
le 5 Déc 2019
How to change the scale of values of the y-axis to a scalar multiple of a specific variable? (i.e. I want to make all values that appear on the y-axis scale as scalar multiples of a varaible "r"). Thank you.
0 commentaires
Réponse acceptée
the cyclist
le 5 Déc 2019
Here is one way:
r = 7;
m = 50;
N = 50;
x = rand(N,1);
y = m*rand(N,1);
figure
plot(x,y,'.');
set(gca,'YTick',0:r:max(y),'YTickLabel',0:r:max(y))
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!