reset button gui matlab

6 visualizaciones (últimos 30 días)
cyrine tijani
cyrine tijani el 11 de Abr. de 2021
Comentada: Walter Roberson el 14 de Abr. de 2021
hi i'm using gui matlab and i want to put a reset button i used this instruction (cla(handles.axes1,'reset');) it worked but the axes became visible instead of invisible how can i fix that please any help ?

Respuestas (1)

Walter Roberson
Walter Roberson el 11 de Abr. de 2021
cla RESET deletes all objects (including ones with hidden handles)
and also resets all axes properties, except Position and Units, to
their default values.
The default property of 'visible' is 'on' and the default property of 'box' is 'on', so when you use 'reset' then you are asking for those properties to be turned on.
You could try immediately turning those properties off again, but you should consider the possibility that 'reset' is not the right approach for you.
  7 comentarios
cyrine tijani
cyrine tijani el 14 de Abr. de 2021
Walter Roberson
Walter Roberson el 14 de Abr. de 2021
%setup -- only needs to be done with respect to one axes, not all of them
ax = handles.axes1(1);
ax.Visible = 'off'; ax.Box = 'off';
props_to_ignore = {'BeingDeleted', 'Legend', 'Parent', 'Position', 'SubTitle', 'Title', 'Type', 'XAxis', 'YAxis', 'ZAxis'};
handles.ax_setable_properties = setdiff( fieldnames(set(ax)), ax_props_to_ignore);
handles.ax_master_props = get(ax, ax_setable_properties);
guidata(ax, handles);

Iniciar sesión para comentar.

Categorías

Más información sobre Visual Exploration en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by