Is there any way to merge several figures already drawn into one fugure??

254 ビュー (過去 30 日間)
Genhou
Genhou 2014 年 4 月 27 日
コメント済み: JohnDylon 2016 年 11 月 19 日
Hi everybody. I have a problem about how to merge several figures drawn already into one figure. It is impossible to merge these figures in the process of code writing, since it involves several large data file. Now I have already drawn all the figures i needed, how can these figures be merged together into one ? Thank you.
  1 件のコメント
atefeh nazari
atefeh nazari 2015 年 6 月 27 日
Hi I have a similar problem. I have 4 figures that are saved as ".fig" and in every of them, there is 3 curve simultaneously. I want to plot these 4 figures(every one has 3 curves in it) by "subplot" (subplot(2,2,1-4)) but I do not know how I can do it .May everybody help me ? Thanks

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

採用された回答

Walter Roberson
Walter Roberson 2014 年 4 月 27 日
  1 件のコメント
Genhou
Genhou 2014 年 4 月 27 日
Thank you. the second website (subplot of already saved figures) offers me the figure i want.

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

その他の回答 (2 件)

Roberto
Roberto 2014 年 4 月 27 日
I think it's possible by extracting the data directly from plots; lets say you have two plots in different figures, get all the line objects, extract the x and y data from line properties and plot them in the same plot with hold on feature, here's a little example:
a= randn(1,100) ; b = randn(1,150) ;
h(1) = figure; plot(a); h(2) = figure; plot(b);
handleLine = findobj(h,'type','line');
hold on ;
for i = 1 : length(handleLine)
plot(get(handleLine(i),'XData'), get(handleLine(i),'YData')) ;
end
in the image I posted i've changed the marker and color of 1 line for clarity purpose.
  1 件のコメント
Genhou
Genhou 2014 年 4 月 27 日
Thanks. the code you give me is to put two figures into one, sharing the same axes. it is very useful, although it is not what i wanted.the fault is made by myself since i described my question in an unclear way. thanks for you kind reply.

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


atefeh nazari
atefeh nazari 2015 年 6 月 26 日
Hi I have a similar problem. I have 4 figures that are saved as ".fig" and in every of them, there is 3 curve simultaneously. I want to plot these 4 figures(every one has 3 curves in it) by "subplot" (subplot(2,2,1-4)) but I do not know how I can do it .May everybody help me ? Thanks
  1 件のコメント
JohnDylon
JohnDylon 2016 年 11 月 19 日
This can give you and somebody checking here a hint:
x=-1000:0.5:1000;
for i=1:8
y=x.^i;
subplot(2,4,i)
hold on
plot(x,y);
end

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

カテゴリ

Help Center および File ExchangeSpecifying Target for Graphics Output についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by