grid
Display or hide axes grid lines.
📝 Syntax
grid
grid('on')
grid('off')
grid('minor')
grid(ax, ...)
📥 Input argument
'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.
💡 Example
f = figure();
x = linspace(0, 20);
y = cos(x);
plot(x, y)
grid on🔗 See also
🕔 History
Version
📄 Description
1.0.0
initial version
Last updated
Was this helpful?