remove grid lines completely

3 views (last 30 days)
I want to remove grilines completely. I just have the .fig file

Accepted Answer

Walter Roberson
Walter Roberson on 25 Jan 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 Comment
Abhijit Sardar
Abhijit Sardar on 25 Jan 2022
This actually works. Thank you so much

Sign in to comment.

More Answers (1)

Kevin Holly
Kevin Holly on 25 Jan 2022
After opening the figure, you can type the following assuming there is only one axes on the figure:
grid off
grid(gca,'off') %The first input target the axes. gca stands for get current axes.
Kevin Holly
Kevin Holly on 25 Jan 2022
See Walter's answer. His answer works for multiple axes.

Sign in to comment.


Community Treasure Hunt

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

Start Hunting!