# MATLAB: How to show the major grid lines as solid and the minor grid lines as dotted

dwhhggridslinelinestyleMATLAB

I would like to set the major grid lines to have a solid linestyle, and the minor gridlines to have a dashed/dotted linestyle.

plot(1:10)gridset(gca,'gridlinestyle','-')grid minor