plotting on multi figures
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Akzeptierte Antwort
Sean de Wolski
am 11 Mai 2011
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!