The semilogy plot doesn't show the grid lines ?

11 visualizzazioni (ultimi 30 giorni)
Haseeb Mufti
Haseeb Mufti il 25 Gen 2016
Risposto: Kate P il 19 Ott 2023
Hi !
I have been working with my code, earlier it plotted fine the BER curve with semilogy but now when I added another case to semilogy it plots the curve fine but the it doesn't show the grid lines of semilogy.
Any kind of help would be appreciated. Currently I am getting the plot as this in the image in the attachment.

Risposte (2)

dpb
dpb il 25 Gen 2016
grid on % both x- and y-axes
or
set(gca,'YGrid','on')
for only y-axis.

Kate P
Kate P il 19 Ott 2023
Make sure to specify the grid after you use the semilog command.
x = [1:1:100];
y = [1:10:1000];
figure('Name','semilog plot')
hold on
fontsize(16,"points")
hold off
semilogx(x,y)
hold on
grid on
semilogx(x,y)
hold off

Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by