Ps.output: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
Line 34: Line 34:


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'').
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'').
==== commands ====
'''paper''' ''[B0-6|A0-6|Legal|Ledger|Tabloid|Executive|Folio]''. Default A4.<br/n>
Type of paper.
'''color''' ''(color)''. Optional.<br/n>Paper color.
'''width''' ''(dimen)'', and '''height''' ''(dimen)''. Optional.<br/n>Custom size of paper.
'''left''' ''(dimen)'', '''right''' ''(dimen)'', '''top''' ''(dimen)'', and '''bottom''' ''(dimen)''. Optional.<br/n>Margins.
'''landscape''' ''yes|no''. Optional, default ''no''<br/n>
paper orientation.
'''font'''. Optional.<br/n>
Block ''font''.
'''draw'''. Optional.<br/n>
Block ''draw''.


=== scale ===
=== scale ===

Revision as of 12:10, 10 October 2010

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.

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).

commands

paper [B0-6|A0-6|Legal|Ledger|Tabloid|Executive|Folio]. Default A4.
Type of paper.

color (color). Optional.
Paper color.

width (dimen), and height (dimen). Optional.
Custom size of paper.

left (dimen), right (dimen), top (dimen), and bottom (dimen). Optional.
Margins.

landscape yes|no. Optional, default no
paper orientation.

font. Optional.
Block font.

draw. Optional.
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.

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).

palette

Common elements on the map

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

scalebar

Maximun 5 scalebars in each map.

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.

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.

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).

raster elevation
end
raster elevation
  grey yes
end
raster lsat5.5 lsat5.4 lsat5.3
end
raster zipcodes_wake
  maskcell zipcodes_wake
  maskcolor 200:200:120
end
raster elevation
  maskcell census_26 elevation
end
raster elevation
  maskcell census_26 elevation
  maskcolor indigo
end
raster zipcodes_wake
  maskcell zipcodes_wake elev_state_500m
  outline
    width .2mm
  end
end
raster zipcodes_wake
  maskcell zipcodes_wake elev_state_500m
  outline 
    width .2mm
    color white
  end
  setcolor 37 black
end

commands

raster (map|map.R map.G map.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
Optional. Draw the rasters in grey scale (small size of file).

maskcell (mask) [(background)]
Optional. 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)
Optional. Set the color of the mask. If a raster map as background is set then it's drawn with a scale white-maskcolor.

outline
Optional. Block line to define ...

setcolor (cat) (color)
Optional, multiple. Replace the color of the cat area with a new color.

Vector maps

vareas

vlines

vpoints

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 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

commands

raster (map).
raster map from take the data of legend.

titlefont. Optional.
Block font for the legend header.

font. Optional.
Block font for the normal text.

frame. Optional.
Block frame.

swidth (dimen). Optional, default ....
Width of the color data.

Category legends

cols (number) [(number)]. Optional, default 1.
Number of columns with symbols and separation between columns.

nodata yes|no. Optional, default no. Category legends.
Remove category no data.

order (number,number,...)'. Optional.
.
Reorder.

Gradient legends

height (dimen) or width (dimen).
Dimension of the frame with the legend.

vertical yes|no. Optional, default no.
Orientation of the gradient legend.

range. Optional.
Manual set of the data range for legend.

gradient yes|no. Optional.
Forze draw gradient legend with category data.

tick (dimen). Optional.
Length of the ticks.

whiteframe (dimen). Optional.
Width of the white frame around the bar color.

vlegend