remove grid lines completely

13 ビュー (過去 30 日間)
Abhijit Sardar
Abhijit Sardar 2022 年 1 月 25 日
コメント済み: Abhijit Sardar 2022 年 1 月 25 日
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 件のコメント
Abhijit Sardar
Abhijit Sardar 2022 年 1 月 25 日
This actually works. Thank you so much

サインインしてコメントする。

その他の回答 (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 Center および File ExchangeGrid 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