Azzera filtri
Azzera filtri

merge two existing figures with each two y-axis

2 visualizzazioni (ultimi 30 giorni)
Marko
Marko il 24 Dic 2019
Commentato: Walter Roberson il 24 Dic 2019
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 Commenti
Walter Roberson
Walter Roberson il 24 Dic 2019
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 il 24 Dic 2019
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.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Interactive Control and Callbacks in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by