Something wrong with the "grid" when I use "semilogy"

2 vues (au cours des 30 derniers jours)
Man Wu
Man Wu le 24 Mai 2014
Commenté : Image Analyst le 24 Mai 2014
BER_simp_M64CR10 =[0.246800130208333 0.194526114583333 0.146794796875000 0.105257096354167 0.0684102031250000 0.0369825703125000 0.0148475182291667 0.00374145052083333 0.000454960937500000 1.79427083333333e-05 2.70833333333333e-07 2.86458333333333e-08 1.82291666666667e-08 1.04166666666667e-08 2.86458333333333e-08 0];
semilogy(SNR,BER_map_M64CR10,'-ok','LineWidth',0.5);
grid on;
I don't know why I get this figure. "grid" in "semilogy" is ok when the I plot other results. please help me. Thank you!
  1 commentaire
Image Analyst
Image Analyst le 24 Mai 2014
I don't understand the problem. Also, what are the "other results"?

Connectez-vous pour commenter.

Réponses (1)

the cyclist
the cyclist le 24 Mai 2014
I'm making a wild guess here, but do you mean that you are getting grid lines where you do not expect them? Or vice versa?
Perhaps try to set the positions of the y-axis ticks manually:
set(gca,'YTick',10.^(-8:0))
and depending on whether you want grid lines at the minor ticks, you can use
set(gca,'YMinorGrid','off')
or
set(gca,'YMinorGrid','on')
But it would be good if you could explain more precisely what the problem is.
  1 commentaire
Image Analyst
Image Analyst le 24 Mai 2014
Maybe he wanted grid lines like on some log plots where they put lines at linear locations and it looks like the grid lines get closer together like this:

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by