Adding a subplot axes to an existing figure.
14 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Walter Roberson
2012 年 7 月 26 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Subplots についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!