フィルターのクリア

merge two existing figures with each two y-axis

2 ビュー (過去 30 日間)
Marko
Marko 2019 年 12 月 24 日
コメント済み: Walter Roberson 2019 年 12 月 24 日
Hi guys,
I need two merge to existing figures which each have two different y-axis.
function merge_plots
fh1 = open('pH45_IA70_Nz80_kH0.fig');
fh2 = open('exp_data_pH45_IA70.fig');
L = findobj(fh1,'type','line');
S = findobj(fh2,'type','axes');
copyobj(L,S);
end
fh1 looks like it should. The problem is, that figure fh2 is only plottet in regard to the 'right y-axis'.
Thank you!
Best,
Marko
  2 件のコメント
Walter Roberson
Walter Roberson 2019 年 12 月 24 日
Figures cannot reliably be merged, as each one can have separate menu bars; it is not possible to have different menu bars for different parts of a single window.
Parts of figures can be copied into parts of other figures, and uipanels can be created that can hold the content from axes if you do not need the match behaviours properly.
Walter Roberson
Walter Roberson 2019 年 12 月 24 日
When you copyobj() something into place, then automatic resetting of axes limits is not done. You might need to set the object invisible and visible again, or set the target axes XLimMode manual and back to auto, and same for YLimMode .
Or you could examine the axes properties to caculate a bounding box that would include all of the data and change the axes limits to that.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by