How to erase grid line

2 views (last 30 days)
taiki kimura
taiki kimura on 26 May 2021
Commented: taiki kimura on 27 May 2021
clear all
set(0,'DefaultAxesXGrid','on');
set(0,'DefaultAxesYGrid','on');
set(0,'DefaultAxesGridLineStyle','-');
x = [125 250 500 1000];
y = [1 2 4 3 ];
semilogx(x,y,'*-');
xx = num2cell(x);
xticks(x)
xticklabels(xx)
I want to keep solid grid lines but erase dotted grid lines .
How do I erase that?

Accepted Answer

Jonas
Jonas on 26 May 2021
Edited: Jonas on 26 May 2021
there are also minor grid lines. use e.g.
set(gca,'xminorgrid','off')
to remove the minor x grid
  1 Comment
taiki kimura
taiki kimura on 27 May 2021
Got it. Thank you.

Sign in to comment.

More Answers (0)

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by