Effacer les filtres
Effacer les filtres

merge two existing figures with each two y-axis

2 vues (au cours des 30 derniers jours)
Marko
Marko le 24 Déc 2019
Commenté : Walter Roberson le 24 Déc 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 commentaires
Walter Roberson
Walter Roberson le 24 Déc 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 le 24 Déc 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.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Interactive Control and Callbacks dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by