Rescaling the x axes and y axes for each plot separately?

1 次查看(过去 30 天)
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!

采纳的回答

Cris LaPierre
Cris LaPierre 2022-10-19
Add an call to the axis function in each subplot with the desired X and Y scaling using the syntax:
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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by