plotting on multi figures
조회 수: 4 (최근 30일)
이전 댓글 표시
I plot data to a figure using a function i have created(using code generation):
function createPlot(x1, y1, title)
figure1 = figure;
% Create axes
axes1 = axes('Parent',figure1,'YGrid','on','XGrid','on');
box(axes1,'on');
hold(axes1,'all');
% Create plot
plot(x1,y1,'LineWidth',2,'DisplayName','y1 vs. x1');
% Create textbox
annotation(figure1,'textbox',...
[0.170811320754717 0.777089783281734 0.237993710691824 0.111455108359134],...
'Interpreter','none',...
'String',{title},...
'FontSize',12,...
'FitBoxToText','off',...
'LineStyle','none',...
'Color',[1 0 0]);
I now write a script to run this for all files in a folder. How can i make each call of the createPlot function above to plot on a different figure
댓글 수: 0
채택된 답변
Sean de Wolski
2011년 5월 11일
It should be opening a new figure each time you call it because of the 2nd line:
figure;
?
So just call it multiple times.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!