how can i plot in the axes of other gui??????
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
hello; i have two gui with buttons and axe i want to plot in the second axe *of the *second gui by cliking int the button on the first gui with the informations in the first gui how can i do ?????
0 comentarios
Respuestas (1)
Walter Roberson
el 14 de Nov. de 2015
findobj() the Tag for the second axes to get its handle. Then use that handle in your plotting calls, either by passing it as the first parameter to the plotting routines (supported by many plotting routines) or by using the axes as the 'Parent' property for plotting routines that allow you to pass Name/Value pairs. For example,
TheOtherAxes = findobj('Tag', 'Gui2axes');
plot(TheOtherAxes, rand(1,20));
4 comentarios
Walter Roberson
el 15 de Nov. de 2015
possible_axes = findobj('Tag', 'axes1');
axes_figures = ancestor(possible_axes, 'figure');
if iscell(axes_figures); axes_figures = cell2mat(axes_figures); end
current_figure = ancestor(gcf, 'figure');
possible_axes = possible_axes(axes_figures ~= current_figure);
if length(possible_axes) ~= 1
error('Could not find unique axes1 belonging to another GUI');
end
TheOtherAxes = possible_axes;
plot(TheOtherAxes, rand(1,20)); %plot on it
Ver también
Categorías
Más información sobre Annotations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!