This command specifies the characteristics of the displayed grid lines.
set grid status <style <color>>
(GrADS version 2.0* and earlier)
set grid status <style <color <thickness>>>
(GrADS version 2.1* and later)
Valid options for status
are:
on
- both latitude and longitude lines are drawnoff
- no grid lines lines are drawnhorizontal
- only latitude grid lines are drawnvertical
- only longigude grid lines are drawn
Options for style
are:
1
- solid 2
- long dash 3
- short dash 4
- long dash, short dash 5
- dotted 6
- dot dash 7
- dot dot dash
The color
argument may be one of the 16 GrADS default colors
or a new color defined with set rgb
.
The thickness
option was added in version 2.1. It controls the thickness of the gridlines, and must be an integer in the range of 1 to 256.
The default behavior is to draw horizontal and vertical grid lines with color number 15 (grey) and line style 5 (dotted).
Changes to the grid display characteristics 'stick' until reset by a new
execution of set grid
, or when a reset
or reinit
command is issued.
You cannot specify a color
without also specifying
a style
. Similarly, you cannot specify a thickness
without a
style
and
color
.
Grid lines are aligned with the labeled tick marks on the X and Y
axes. GrADS chooses appropriate defaults for spacing of the labeled
tick marks, but these defaults may be overridden by the commands
set xaxis,
set yaxis,
set xlint,
set ylint,
set xlevs,
and
set ylevs.
Please consult these
reference pages for more information.
When using GrADS version 2.1 and later, and if your build has the Cairo graphics library enabled,
then each thickness
setting will increment the grid line thickness. This is different from the behavior in earlier versions, where the grid line thickness setting was fixed at 1. The default grid line thickness setting in version 2.1+ is 4.
The default line widths for thickness
settings between 1 and 12 are: 0.6, 0.8, 1.0, 1.25, 1.5, 1.75, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0.
The units will depend on the surface being drawn to (pixels or points). In GrADS version 2.1 and later, there is a new command, set lwid
, that allows the user to define a new line thickness setting if the 12 default widths are unsatisfactory.
set grid on 3 1 2