フィルターのクリア

plot 3 figures in 1 figure

296 ビュー (過去 30 日間)
Deniz
Deniz 2013 年 12 月 19 日
Hi,
I have 3 figures:
curve1.fig
curve2.fig
curve3.fig
Each figure has a curve. I want to plot these 3 curves in 1 figure.
Can you help me? Thanks
  2 件のコメント
Mahmudur Rahman
Mahmudur Rahman 2017 年 1 月 5 日
U can plot all three curves in one figure using
plot(x1,y1,'g',x2,y2,'b',x3,y3,'r')
g,b,r are different colors...
Sandali Wasana Kumarapeli Arachchige Dona
lot(x1,y1,'g',x2,y2,'b',x3,y3,'r') Works better

サインインしてコメントする。

採用された回答

David Sanchez
David Sanchez 2013 年 12 月 19 日
No, there is not an easier way to plot three figures in a single window than using subplot.
subplot(3,1,1)
plot(x1,y1)
subplot(3,1,2)
plot(x2,y2)
subplot(3,1,3)
plot(x3,y3)
where xith and yith are your variables.
  1 件のコメント
Deniz
Deniz 2013 年 12 月 19 日
ok, i understand. but i need to plot (x1,y1) (x2,y2) and (x3,y3) in one and the same figure. What about this?

サインインしてコメントする。

その他の回答 (2 件)

Joseph Schey
Joseph Schey 2017 年 11 月 13 日
For future users, using "hold on" between each plot should keep them in the same graph.
For example
plot(t,x1)
hold on
plot(t,x2)
hold on
plot(t,x3)
will plot the 3 graphs on one.

ES
ES 2013 年 12 月 19 日
do you mean subplot ?
  2 件のコメント
Deniz
Deniz 2013 年 12 月 19 日
Is there no easier way to show three different figures in 1 figure? the axes are the same in all figures.
ROSHAN  MOHAPATRA
ROSHAN MOHAPATRA 2015 年 4 月 10 日
Chocolate Warrior read the question carefully then answer... he is telling how to plot 3 different values in a single figure ..
example-
x=[0.088 0.029 0.0039]
y=[40 34 28]
z=[54 109 212]
xyz plotting should be shown in a single figure not separated figures

サインインしてコメントする。

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by