Grid not showing on UIAxes

46 visualizaciones (últimos 30 días)
Jason
Jason el 29 de Abr. de 2021
Editada: Benjamin Kraus el 30 de Abr. de 2021
Hello. I am plotting some data on a Canvas in appdesigner, and the grid isn't showing.
(The plot is fine)
ax=app.UIAxes10;
IP=app.plotdata; %my data
plot(ax,IP,'-.','LineWidth',0.3);
grid(ax,'on');
ax.Color=[0.15 0.15 0.15];
ax.GridColor=[1 1 1];
ax.MinorGridColor=[1 0 1];
hold(ax,'on');
However, If i now do a
cla(app.UIAxes10,'reset')
then when I plot again it does show!

Respuesta aceptada

Jason
Jason el 30 de Abr. de 2021
Seems you need to do this.
set(gca, 'XTickMode', 'auto', 'XTickLabelMode', 'auto')
  1 comentario
Benjamin Kraus
Benjamin Kraus el 30 de Abr. de 2021
Editada: Benjamin Kraus el 30 de Abr. de 2021
Note that you can reset XTickMode and XTickLabelMode to 'auto' within App Designer as well as within code.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Specifying Target for Graphics Output en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by