Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

How can I export axes from existing figures to put in plotyy?

1 Ansicht (letzte 30 Tage)
Federica Mauri
Federica Mauri am 28 Apr. 2016
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
I'm trying to write a code to export axes from two existing figures to make one with plotyy. I know that the following code pick my matrix F with all the names and open the figures and save their axes.
a = '.fig';
for i = 1:size(F,2)
A = strcat(F{1,i},a);
h{i} = openfig(char(A)); % open figure
ax{i} = gca; % get handle to axes of figure
end
h3 = figure; %create new figure
Now here's the problem: gca puts all my axes in a structure, so when I try to write plot(ax{1},ax{2}) it doesn't work. I tried to find an answer in other questions exposed in the Community, but all that I found don't work. How can I fix it? What's the other way?
Thank you a lot

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by