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

조회 수: 1 (최근 30일)
Miriam Braig
Miriam Braig 2022년 10월 19일
댓글: Miriam Braig 2022년 10월 19일
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