필터 지우기
필터 지우기

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 CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by