grid
Display or hide axes grid lines.
📝Syntax
grid
grid('on')
grid('off')
grid('minor')
grid(ax, ...)
📥Input Arguments
Parameter Description
'on' displays the major grid line.
'off' removes all grid lines.
'minor' toggles the visibility of the minor grid lines.
ax Target object: axes.
📄Description

grid() toggles the visibility of the major grid lines.

💡Examples
f = figure();
x = linspace(0, 20);
y = cos(x);
plot(x, y)
grid on
Example illustration
🔗See Also
axesplot
🕔Version History
Version Description
1.0.0 initial version
Edit this page on GitHub