matlab - Set equal limits for y-axis for two figures -
how can make vertical axes of 2 plots equal?
for example:
a = [1 2 3; 21 1 3; 4 2 3; 4 5 6] after plotting plot(a(1, :)) following figure:

i have done simple operations:
[u e v] = svd(a); figure(2); plot(u(1,:)) and figure: 
how make y-axis limits of both plots equal? axes equal command?
update:
i've used following commands:
figure (1) ylim([0 3]) plot(a(1,:)) figure (2); ylim([0 3]) plot(u(1,:)) but same result...
you can use ylim force limits on y-axis. example:
figure(1) %// plotting... ylim([0 3]) figure(2) %// more plotting ylim([0 3]) this ensures y-axis limited range [0, 3] in both plots. can same limits of x-axis command xlim.
also note if want set limits both axes @ once, instead of using xlim , ylim (two commands), can use axis (one command).
Comments
Post a Comment