Rescaling the x axes and y axes for each plot separately?
1 view (last 30 days)
Show older comments
Miriam Braig
on 19 Oct 2022
Commented: Miriam Braig
on 19 Oct 2022
Dear all,
I am having trouble adjusting the scaling of the x axis and y axis in the codes. I have tried a lot and can't figure it out. That's why I hope to find the solution here.
I would like to change the x and y axes for each variable separately, so that for example the variable s is represented in an x=(0;20) and y=(0; 1) space, while the variable pi is represented in an x=(0;20) and y=(0; 5) space.
At the moment the output looks like this:
And those are the codes I'm using:
Can anyone tell me what I have to do ?
Many thanks for your help!
0 Comments
Accepted Answer
Cris LaPierre
on 19 Oct 2022
For example,
axis([0 20 0 1])
If you want to do it all in a single loop like you have, predefine your limits and then extract the corresponding row.
lmt = [0 20 0 1; 0 20 0 5]
for jj = ...
plot...
axis(lmt(jj,:))
end
More Answers (0)
See Also
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!