Multiple plots sharing x axis

13 ビュー (過去 30 日間)
SAINT
SAINT 2017 年 9 月 1 日
編集済み: the cyclist 2017 年 9 月 2 日
I have several IR spectra that I want to display one above the other for comparison sake. I also want them all to share the same X-axis in a similar manner to this. Can anyone offer any insight into how to do this? I've been messing around with the "subplot" function but I'm not having much luck.

回答 (1 件)

the cyclist
the cyclist 2017 年 9 月 2 日
編集済み: the cyclist 2017 年 9 月 2 日
x = 1:5;
y = rand(1,5);
z = rand(1,5);
figure
plot(x,y,x,z)
You can do the same method with different x values for y and z, too.

カテゴリ

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