From: Tiago on
Hello,

I have plot some subplots in one figure, but because of the numbers of subplots I need to add an mouse click event or something to open any of the subplot in other figure.

Best regards!
From: Tiago on
Perfect!

Thanks a lot! =)

Best regards!
From: dpb on
Tiago wrote:
> Hello,
>
> I have plot some subplots in one figure, but because of the numbers of
> subplots I need to add an mouse click event or something to open any of
> the subplot in other figure.

I don't understand this (and apparently nobody else did, either)...

--
From: Matt Fig on
I think you might be looking for something like this:


function [] = copyaxes()
% Creates some plots. Once plotted, clicking on a plot copies it to a new figure.
for ii = 1:4
ax(ii) = subplot(2,2,ii);
plot(0:.1:1,(0:.1:1).^ii)
end

set(gcf,'WindowButtonDownFcn',{@f_wbfcn})

function [] = f_wbfcn(varargin)
% Windowbuttondownfcn for figure. Recreates the plot which was clicked.
ch = get(gca,'children');
figure
copyobj(ch,axes);