MATLAB: How can i plot in axes in other figure

axesfigure

i have a figure 1 and i wish plot in axes 2 in figure2 within a callback push bouton of the first figure????????? i will be presaure

Best Answer

If ax2 is a handle to the appropriate axes in figure 2, then
plot(ax2, .... whatever you want to plot)
For example
fig2 = figure(2);
ax2 = findobj(fig2, 'tag', 'axes2'); %retrieve the handle from the figure
plot(ax2, t, pressure);