How can I combine saved .fig files as subplots in new figure - when they have been created using yyaxis?
4 views (last 30 days)
Show older comments
Jamie Cross on 22 Dec 2020
Answered: Prabhanjan Mentla on 1 Jan 2021
Hi, I am trying to combine the attached four figures into a single figure with 2x2 subplots. Using codes from related questions previously posted on the forum, I have come up with the following attempt:
% Load saved figures
% Prepare subplots
fig_name = 'Pred_dens_full';
h=gobjects(2*2,1); % preallocate for the axes handles
% Paste figures on the subplots
% Add legends
While the code makes a new figure with 2x2 subplots, unfortunately the y-axis fails to take into account that the previously saved figures have been created with the yyaxis command. Is there any way that I can fix this?
Thank you for your time.
Prabhanjan Mentla on 1 Jan 2021
copyobj has certain limitations and one among them is yy-axis. Refer this link for more details.
However, you could achieve the same by converting them into png/jpg using matlab, subplot followed by imshow.
Hope this helps.
Find more on Interactive Control and Callbacks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!