remove grid lines completely

12 次查看(过去 30 天)
I want to remove grilines completely. I just have the .fig file

采纳的回答

Walter Roberson
Walter Roberson 2022-1-25
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 个)

Kevin Holly
Kevin Holly 2022-1-25
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 个评论
Abhijit Sardar
Abhijit Sardar 2022-1-25
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 2022-1-25
See Walter's answer. His answer works for multiple axes.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Grid Lines, Tick Values, and Labels 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by