stock plots, errorbars in a growing variable.
Mostrar comentarios más antiguos
Hello,
I find a little bit difficult to understand how to propperly handle multiple figures in matlab.
I am creating different plots (set of points (of vector values) and errorbars) that are created inside a loop and stacking them together as the loop is runned (using hold on).something like this:
for i=1:5
for j=1:2
figure (1)
plot(a{i}{j}(:,1),b{i}{j}(:,1))
errorbars(a{i}{j}(:,1),b{i}{j}(:,1),Uuper{i}{j}(:,1),Ulower{i}{j}(:,1))
figure(2)
plot(a{i}{j}(:,1),c{i}{j}(:,1))
errorbars(a{i}{j}(:,1),c{i}{j}(:,1),Uuperc{i}{j}(:,1),Ulowerc{i}{j}(:,1))
end
end
and wanted to create a subplot of the combination of them. I know that I can use the subplot directly inside of the loop to stack them directly. but what I was wondering is to be able to define the figures as a "single" figure and then calling it back to use the tiledlayout .Something like stacking them inside a variable array that could be called as fig(1) , fig(2) etc.
thanks
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Creating, Deleting, and Querying Graphics Objects en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!