remove grid lines completely

17 visualizaciones (últimos 30 días)
Abhijit Sardar
Abhijit Sardar el 25 de En. de 2022
Comentada: Abhijit Sardar el 25 de En. de 2022
I want to remove grilines completely. I just have the .fig file

Respuesta aceptada

Walter Roberson
Walter Roberson el 25 de En. de 2022
filename = 'something.fig';
fig = openfig(filename);
ax = findobj(fig, 'type', 'axes');
set(ax, 'XGrid', 'off', 'YGrid', 'off', 'ZGrid', 'off', 'XMinorGrid', 'off', 'YMinorGrid', 'off', 'ZMinorGrid', 'off');
  1 comentario
Abhijit Sardar
Abhijit Sardar el 25 de En. de 2022
This actually works. Thank you so much

Iniciar sesión para comentar.

Más respuestas (1)

Kevin Holly
Kevin Holly el 25 de En. de 2022
After opening the figure, you can type the following assuming there is only one axes on the figure:
grid off
or
grid(gca,'off') %The first input target the axes. gca stands for get current axes.
  2 comentarios
Abhijit Sardar
Abhijit Sardar el 25 de En. de 2022
there are two axis that is th problem. otherwise grid off would have worked. ok , where should i type this line.
Kevin Holly
Kevin Holly el 25 de En. de 2022
See Walter's answer. His answer works for multiple axes.

Iniciar sesión para comentar.

Categorías

Más información sobre 2-D and 3-D Plots 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