obtain "gca" and "gcf" from an existing fig file, which was generated by "plotyy"
4 ビュー (過去 30 日間)
古いコメントを表示
I plan to modify the exiting fig and therefore, the "gca" and "gcf" information is needed. but get(gca) is only valid for the first layer of the plot. But I also want modify the second layer.
so how can I get information for both layers, i.e., gca1 and gca2?
Thanks
0 件のコメント
回答 (2 件)
Walter Roberson
2012 年 9 月 13 日
FigureNumber = openfig('TheName.fig');
axes_handles = findobj(FigureNumber, 'type', 'axes');
2 件のコメント
Walter Roberson
2012 年 9 月 14 日
openfig() will create a figure. Figures are never nested. The created figure will be at exactly the same layer as it was when it was created. The only difference may be in the figure number.
per isakson
2012 年 9 月 14 日
編集済み: per isakson
2012 年 9 月 14 日
The doc (R2012a) says:
[AX,H1,H2] = plotyy(...) returns the handles of the two axes created
in AX and the handles of the graphics objects from each plot in H1 and
H2. AX(1) is the left axes and AX(2) is the right axes.
参考
カテゴリ
Help Center および File Exchange で Two y-axis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!