simple 2d x,y plot with another 2 x and y axis enabled
古いコメントを表示
I'd like to plot a simple 2d scatter that has all 4 axis enabled with preset scale factors.
e.g.
master x and y plot is a simple relationship of:
x1=0:1:50;
and then y1 is multiplied by a scale factor of, say, 10
y1=x1*10;
so I want to plot(x,y) BUT having another vertical (y2) and horizontal (x2) axis opposite to master x1 and y1 axis having their own scale factors, say, x2=x1^2 and y2=x1/1000 or whatever. Thank you.
回答 (1 件)
Azzi Abdelmalek
2013 年 3 月 9 日
編集済み: Azzi Abdelmalek
2013 年 3 月 9 日
Example
x1=0:0.5:10;
y1=0.1*sin(0.1*x1);
x2=0:0.5:20;
y2=0.1*cos(0.1*x2);
[ax,h1,h2]=plotyy(x1,y1,x2,y2)
set(ax(2),'XaxisLocation','top','YaxisLocation','right')
カテゴリ
ヘルプ センター および File Exchange で Two y-axis についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!