Ps.output
The ps.out try to update the standard postscript output of Grass adding new features to design borders, graticules, categorized legends, etc
Command line flags
-d Draw a 1x1 cm grid on paper to help the placement of the elements of the map.
-e Make an output file without the postscript header. Useful when is embebed into other ps.out map.
-g Use the extended PostScript of Ghostscript (for transparent colors only)
-s Draw the small digit in the coordinate numbers to lower instead upper possition.
-
A4 paper with flag -d
-
coordinate
-
coordinate with flag -s
Generic Instructions
font
line
frame
dimen
Map paper
paper
The block paper has an online value to define the base size of the paper. Valid options are: B0-6, A0-6, Legal, Ledger, Tabloid, Executive, or Folio. For all, the default left and right margins are 0.5 inch, and 1 inch in top and bottom margins. Custom dimensions are possibles with commands height and width while margins with the commands left, right, top, and bottom.
Also, in ps.out is possible define the backcolor of the paper (color), orientation (landscape), default font (font) and free draw of decorates as watermarks before any feature of the map is drawn (draw).
- paper [B0-6|A0-6|Legal|Ledger|Tabloid|Executive|Folio]
- Type of paper (default A4).
- color (color)
- Paper color.
- width (dimen), height (dimen)
- Custom size of paper.
- left (dimen), right (dimen), top (dimen), bottom (dimen)
- Custom margins (default 0.5" left and right, and 1" top and bottom).
- landscape yes|no
- Paper orientation (default no).
- font
- Block font. Set the default font of the map.
- draw
- Block draw.
scale
Simple command to define the scale of the map (default adjust map to the paper dimensions). For example, scale 1:500000 to rescale maparea dimensions.
- scale 1:(number)
- Scale of map, if possible.
maparea
The block maparea define specific dimensions of the map (default defined by command scale). In particular height, widht, and the positions in the paper with left and top.
There are two special command: color, define the color of the border of the map (draw with grid...); and border, define the width of the border of the map (usefull with in and out formats).
- border (dimen)
- color (color)
- fcolor (color)
- width (dimen), height (dimen)
- top (dimen), bottom (dimen)
palette
Common map elements
grid and geogrid
Draw a graticula around the map. Predefined format: iho, can, in, out, or +out (numbers in the four limits of the map).
Many modifications are possibles to change color and style of the major and minir lines, trim zeros, etc. For example, to draw a typical border you must use the border set to 0.8mm in a maparea block, select the format out, set the style and color of the subdivisions, etc
-
iho
-
can
-
in
-
+out
-
typical map border
-
typical map border with subminor 5 and fcolor blue
-
cross 500, fcolor indigo, color 200:200:200 in maparea
scalebar
Maximun 5 scalebars in each map.
-
s
-
S
-
I (uppercase i)
-
f
-
F
-
Multiple scalebars zero centered with zero yes
note
The block note permit write text on any place of the paper with frame, etc (also draw permit write text in paper). This command has an inline value with the text; this text can be a keywords: :maplimits, :dimen, :scale, or :file (to read the text from file); or free text in one line using '|' to break lines and '.' as first character to center line.
Maximun 20 notes by map.
-
:maplimits
-
:dimen
-
:scale
-
in multiple lines
-
.centered
-
:scale scale with angle 90
draw
The block draw run over map and all is clipped to the map limits. This command draw predefined postscript code.
However, there is an optional value to modify this feature. Valid options are: (1) paper: run before any map feature is drawn (equivalent to place inside paper block); and (2) free: run after all map features are drawn then it's draw over map but not clipped.
-
north 700000 4700000
-
north 5cm 16.5cm -
-
maplimits
-
compass 700000 4700000 10000 10.2345
Raster maps
raster
This block draw one or two raster maps on the maparea.
The following gallery show the output of the commands inside the raster block (all mapnames are of type raster).
commands
All commands are optional except raster and end.
- raster (raster|raster.R raster.G raster.B|:group)
- The inline value is the raster mapname, three maps to draw as RGB, or a groupname (leader by ':') with tree RGB maps.
- grey yes|no
- Draw the rasters in grey scale (small size of file).
- maskcell (mask) [(background)]
- Set the map to use as mask (independent of the mask set in GRASS with r.mask) and, optionally, the raster map uses as background.
- maskcolor (color)
- Set the color of the mask. If a raster map as background is set then it's drawn with a scale white-maskcolor.
- outline
- Block line to define ...
- setcolor (cat) (color)
- Replace the color of the cat area with a new color. Multiple setcolor are possibles.
Vector maps
common commands
All commands are optional.
- layer (number)
- Layer number used with cats/where option.
- cats (n1,n2,...)
- List of cats to show.
- where (sql)
- Argument of the SQL where clausule to filter the areas to show.
- masked yes|no
- Masked or not by raster mask (default no).
- label (text)
- For description or title in vlegend.
- lpos(number)
- Position where vector is plotted in legend and block.
vareas
Draw areas on the map. The areas always are drawn first, on the bottom of other type of maps.
- vareas (vector)
- vector is a vector of areas, except when lwidth is different to zero that vector is a vector of lines.
The next commands are optionals.
- line
- Block line to set the style of the border line of the areas.
- lwidth (dimen)
- Line map draws as an area with a width = lwidth (positive or negative).
- fcolor (color|rgbcol|- rulecol)
- Static fill color, dynamic fill color in a column of the database, or '-' and the name of a column of the datase to apply the rules (color in rules).
- island yes|no
- Draw island as normal areas (fill as normal area then hide it).
- pat (epsfile)
- Pattern in a EPS file.
- pscale (number)
- Scale of pattern.
- pwidth (dimen)
- Width of the lines of pattern.
- setrule (n1-n2[:color] text
- Make a item of a sublegend with label the text and title the text of the label. Also, the fillcolor of the areas of the map with column >= n1 and column < n2 (column from fcolor), is set to color.
examples
vlines
Draw lines on the map. The areas always are drawn second, after vareas and before vpoints.
- vlines (vector)
The next commands are optionals:
map is a vector of lines, except if type is boundary that map is a vector of areas.
- type boundary|line
- Draw boundaries of a vector of areas or lines of a vector of lines.
- line
- Block line. Normal line.
- rgbcol (rgbcol [rulecol])
- Define the database column to take the lines colors and, optionally, a column to the rules.
- hline
- Block line. Highlight line.
- offset (dimen)
- Works with hline to offset from the center of line.
- setrule (n1-n2[:color] text
- Make a item of a sublegend with text as label and title the text of the label. Also, the color of the normal line with column >= n1 and column < n2 (column from rgbcol), is set to color.
examples
vlines roadsmajor
type line
line
width 1mm
color yellow
end
hline
width 1mm
color red
end
end
|
vpoints
Draw points on the map. The points always are drawn last, after vareas and vlines.
- vpoints (vector)
vector is a vector of points, except when type is centroid or boundary that it is a vector of areas, or when type is line that it is a vector of lines.
The next commands are optionals:
- type centroid|line|boundary|point
- Type of draw (default point).
- symbol (epsfile)
- Symbol to use.
- line
- Block 'line'. Type of line in the symbol.
- fcolor (color)
- Static fillcolor of the symbol.
- size (number|database [number])
- Size of the symbol take from number or from a column of the database. In the last option, there is a optional number to define the static size of the symbol in the legend.
- scale (dimen.1 [dimen.2])
- Rescale the size of the symbol by the dimen.1 and, optionally, add a dimen.2 (usefull when there are sizes of zero, e.g., precipitation).
- offset (dimen)
- Offset of the symbol.
- rotate (number|database)
- Angle to rotate the symbol, static number or dynamic in a column of the database.
- dist (dimen)
- Define the distance between symbol over the line (only when type is line).
- cline
- Block line. Type of line that connect symbols (only when type is line).
Legend of the maps
rlegend
The block rlegend show the legend of a raster map. In the following images are shown the two types of outputs: the left one when raster is 'category' and the right one when is 'gradient'. In the code, the frame sub-command is not shown, and the cols, swidth, height, and order commands are optionals. Also, the units meters in the gradient legend is set with r.support.
- rlegend [text]
- Text is the title of the legend.
- raster (map)
- raster map to take the data of legend.
The next commads are optionals:
- titlefont
- Block font for the legend header.
- font
- Block font for the normal text.
- frame
- Block frame.
- swidth (dimen)
- Width of the color data.
- Category legends
- cols (number) [(number)]
- Number of columns with symbols and separation between columns (default 1).
- nodata yes|no
- Remove category no data.
- order (n1,n2,...)
- To reorder items.
- Gradient legends
- height (dimen), width (dimen)
- Dimension of the frame with the legend.
- vertical yes|no
- Orientation of the gradient legend (default no).
- range
- Manual set of the data range for legend.
- gradient yes|no
- Forze draw gradient legend with category data.
- tick (dimen)
- Length of the ticks.
- whiteframe (dimen)
- Width of the white frame around the bar color.
Examples
rlegend Zip Codes (wake)
raster zipcodes_wake
cols 2 0
swidth 8mm
order 20,10,30,22,34
end
|
rlegend
raster elevation
height 8cm
end
|
rlegend
raster elevation
width 8cm
vertical no
end
|