%% Display Major and Minor Grid Lines
% Display the major and minor grid lines for a sine plot.

% Copyright 2015 The MathWorks, Inc.


x = linspace(0,10);
y = sin(x);
plot(x,y)
grid on
grid minor

%%
% By default, major grid lines use a solid line style and align with the
% tick marks. Minor grid lines use a dotted line style and lie between the
% tick marks.