Bringing plots into a single figure

조회 수: 18 (최근 30일)
Ede gerlderlands
Ede gerlderlands 2013년 7월 27일
답변: Farhad Sedaghati 2015년 6월 26일
Hi All;
I have 6 matlab plots which I myself didn't plot. Can I bring this separate plots into one plot of 3x2 subplots.
Any help is highly appreciated.
  댓글 수: 1
priyanka
priyanka 2013년 7월 28일
yes u can.it can b done as follows. plot(ur variable to b plotted) subplot(3,2,1); imshow(variable); similarly u can do it for all d plots by giving subplot(3,2,2); subplot(3,2,3); subplot(3,2,4); subplot(3,2,5) subplot(3,2,6);
try this

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2013년 7월 28일
Read in all of your image files with imread(). Then use subplot() and image() or imshow() to display.
figure;
subplot(2,3,1);
imshow(image1);
title('Image #1', 'FontSize', 24);
subplot(2,3,2);
imshow(image2);
title('Image #2', 'FontSize', 24);
etc.
subplot(2,3,6);
imshow(image6);
title('Image #6', 'FontSize', 24);
% Enlarge figure to full screen.
set(gcf, 'units','normalized','outerposition',[0 0 1 1]);

추가 답변 (3개)

Jan
Jan 2013년 7월 27일
It depends on what "I have plots" exactly mean. Are they printed on paper, saved as image files or as FIG files? Are they contained in an open figure created by another Matlab program?
  댓글 수: 1
Ede gerlderlands
Ede gerlderlands 2013년 7월 27일
Thank you. I have them as image file and ofcourse matlab figure.

댓글을 달려면 로그인하십시오.


per isakson
per isakson 2013년 7월 28일
편집: per isakson 2013년 7월 29일
Many contribution to in the File Exchange address your problem:
  • there are dozens of replacements for subplot, however, I failed to find a good search string.
  • MontageFigures Creates Montage (subplots) of Specified Figures and their subplots.
  • Import Fig File to Axes
  • figs2subplots Combine axes in many figures into subplots in one figure.
  • PlotManager The PlotManager is designed for anyone who is regularly producing various plots that should be in subplots during development/experimenting for good overview and later be exported as single figures (e.g. in high quality).
Warning: This is the result of a quick search and some copy&paste.

Farhad Sedaghati
Farhad Sedaghati 2015년 6월 26일
This following function helps you to put several fig files next to each other as subplots: http://www.mathworks.com/matlabcentral/fileexchange/51236-subplot It is important to note that all the saved fig file should be 2D and single plot (No subplots)

카테고리

Help CenterFile Exchange에서 Subplots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by