How to erase grid line

10 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

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!