How to insert dash-line in a matlab figure?

2 views (last 30 days)
Kamruzzaman Bhuiyan
Kamruzzaman Bhuiyan on 29 Nov 2021
Answered: VBBV on 29 Nov 2021
How can i add such horizontal dash-line in a matlab figure?

Answers (1)

VBBV
VBBV on 29 Nov 2021
x = 0:360;
y = rand(361,1);
plot(x,y);
ax = gca;
ax.YGrid = 'on';
ax.LineWidth = 1.5;
set(ax,'GridLineStyle', '-.')

Community Treasure Hunt

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

Start Hunting!