Combine two existing Matlab figs, into one figure with two y axes (keeping the respective axes titles and units)
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi, I have two Matlab figs, although not the original data in a *.mat file, which share the same 'x' axis, but not 'y' (one curve in each figure). I wish to combine Fig. 2 into Fig, 1, but have two y axes, with the original axis titles and units. I also wish to keep the original symbols and the same color map for the curves from the two pictures. What is the easiest way to do that?
Thank you.
4 comentarios
dpb
el 5 de Ag. de 2018
Editada: dpb
el 5 de Ag. de 2018
I think I mistyped/misnamed the new world replacement for the deprecated plotyy :)
-- it's |yyaxis| instead. Sorry...
ADDENDUM
I did just try a 'spearmint; took the example for two axes and created two figures instead of the L/R axes. Then with some rigamarole to get all the necessary handles to the lines that are children of their respective axes,
yyaxis left
hAxL=gca;
copyobj(hL1,hAxL)
yyaxis right
hAxR=gca;
copyobj(hL2,hAxR)
did bring over the line colors, markers, etc., ... I didn't experiment with the titles and all, but the basic operations seems to work ok.
Respuestas (0)
Ver también
Categorías
Más información sobre Annotations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!