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 Center および File ExchangeAnnotations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by