Adding a subplot axes to an existing figure.
14 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Walter Roberson
le 26 Juil 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 commentaires
Voir également
Catégories
En savoir plus sur Subplots dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!