Info

This question is closed. Reopen it to edit or answer.

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

1 view (last 30 days)
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

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!