Adding a subplot axes to an existing figure.
15 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Greetings -
Is there away to expand the size of a subplot grid once it has been created. Suppose I the following subplot:
h = figure();
h1 = subplot(2,1,1); plot(rand(10,1));
h2 = subplot(2,1,2); plot(rand(10,1));
I would like to be able to add a third subplot to the array without recreating the figure.
I have looked into two ways of doing it so far. Once with modifying the appdata for the figure using getappdata(h, with "SubplotListeners" and "SubplotGrid" and havent had much sucess. The other thing I was considering is simply creating a new figure off the screen, copying the axes handles over to it and moving it into the screen while deleting the old one.
Has anyone has sucess with something similar to this?
Best Regards,
Brandon
0 Commenti
Risposte (1)
Walter Roberson
il 26 Lug 2012
subplot() works by position. Set new Position (or possibly OuterPosition) for the existing subplots and then you can subplot() the new one into place. If I recall correctly, you can read the source,
type subplot
0 Commenti
Vedere anche
Categorie
Scopri di più su Subplots in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!