| MATLAB Function Reference | ![]() |
To control the presence and appearance of grid lines on a graph,
use the Property Editor, one of the plotting tools
. For details, see The
Property Editor in the MATLAB® Graphics documentation.
grid on
grid off
grid
grid(axes_handle,...)
grid minor
The grid function turns the current axes' grid lines on and off.
grid on adds major grid lines to the current axes.
grid off removes major and minor grid lines from the current axes.
grid toggles the major grid visibility state.
grid(axes_handle,...) uses the axes specified by axes_handle instead of the current axes.
grid sets the XGrid, YGrid, and ZGrid properties of the axes.
grid minor sets the XMinorGrid, YMinorGrid, and ZMinorGrid properties of the axes.
You can set the grid lines for just one axis using the set command and the individual property. For example,
set(axes_handle,'XGrid','on')
turns on only x-axis grid lines.
You can set grid line width with the axes LineWidth property.
The properties of axes objects
Axes Operations for related functions
![]() | graymon | griddata | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |