GRIDLINES is a MATLAB library which contains routines to draw grid lines on MATLAB plots.
MATLAB's plotting commands include the "grid on" option, which places a certain number of grid lines on your plot. However, if you don't like the choice of placement, linestyle, coloring, or the number of grid lines, changing these features, while possible, requires an extensive trip through MATLAB's plotting underworld.
But gridlines are just lines, and you can use the line command to draw them. The functions provided here do just that, with a reasonable interface that lets you select where and how many lines you want. If you look inside the text of the functions, you can easily modify other features, such as the line color.
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
CC_DISPLAY, a MATLAB program which displays the abscissas used in various kinds of Clenshaw Curtis quadrature rules.
GL_DISPLAY, a MATLAB program which displays the abscissas used in various kinds of Gauss Legendre quadrature rules.
GRID_DISPLAY, a MATLAB library which can display a 2D or 3D grid or sparse grid.
MESH_DISPLAY, a MATLAB program which reads data defining a polygonal mesh and displays it, with optional numbering.
NESTED_SEQUENCE_DISPLAY, a MATLAB program which displays a set of nested sequences.
SEQUENCE_STREAK_DISPLAY, a MATLAB program which displays a "streak plot" of a numeric sequence;
TRIANGULATION_DISPLAY, a MATLAB program which displays the nodes and elements of a triangulation on the MATLAB graphics screen;
XY_DISPLAY, a MATLAB program which reads a set of 2D points from a file and plots them in a the MATLAB graphics window.
XYF_DISPLAY, a MATLAB program which reads XYF information defining points and faces in 2D, and displays an image in a MATLAB graphics window.
XYL_DISPLAY, a MATLAB program which reads XYL information defining points and lines in 2D, and displays an image in a MATLAB graphics window.
XYZ_DISPLAY, a MATLAB program which reads a set of 3D points from a file and plots them in a the MATLAB graphics window.
You can go up one level to the MATLAB source codes.