How to erase grid line

9 vues (au cours des 30 derniers jours)
taiki kimura
taiki kimura le 26 Mai 2021
Commenté : taiki kimura le 27 Mai 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?

Réponse acceptée

Jonas
Jonas le 26 Mai 2021
Modifié(e) : Jonas le 26 Mai 2021
there are also minor grid lines. use e.g.
set(gca,'xminorgrid','off')
to remove the minor x grid
  1 commentaire
taiki kimura
taiki kimura le 27 Mai 2021
Got it. Thank you.

Connectez-vous pour commenter.

Plus de réponses (0)

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by