Click on Subplot and Open it in a "New" Figure
36 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi everyone!
I've set up my code to plot four subplots into one figure. I'm using this array of subplots as an overview of my signal data to do a quick check of what's going on in the signal.
However, after plotting these four axes into one figure, I'd like to be able to click on one of the subplots in "Figure 1" and have that subplot open in its own "Figure 2" in which I could do more detailed plotting work.
Any help?
Thanks!
JF
0 commentaires
Réponses (2)
Luffy
le 10 Juil 2012
One way of doing this is:
Example:
h = figure;
income = [3.2,4.1,5.0,5.6];
outgo = [2.5,4.0,3.35,4.9];
subplot(2,1,1); plot(income)
title('Income')
subplot(2,1,2); plot(outgo)
title('Outgo')
g = figure; % g is new figure where subplot is to be presnt
copyobj(get(h,'Children'),g);
% Now if you want subplot(2,1,1) delete other subplots(in ur case u hv to delete 3 other subplots which u don't want)
% In this example i delete subplot(2,1,2)
delete(subplot(2,1,2));
2 commentaires
Ilham Hardy
le 10 Juil 2012
Modifié(e) : Ilham Hardy
le 10 Juil 2012
How do you know which figure (subplot) was clicked?
Voir également
Catégories
En savoir plus sur Subplots 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!