Psmap simple example

From GRASS-Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Very simple example

This example plots a raster map with title and legend.

# Spearfish dataset
raster elevation.10m
header
  end
colortable
  where 0.75 1.5
  end
end


Simple example
# Simple ps.map example using the Spearfish dataset
g.region rast=elevation.10m

ps.map output=spearfish.ps << EOF
paper us-letter
  end
scale 1:120000
raster elevation.10m
colortable
  where 2 6.75
  end
text 50% -7% Spearfish County, ND (Mount Rushmore)
  fontsize 16
  end
mapinfo
  where 4.5 7.25
  end
vlines roads
  where label ~ 'highway' OR label = 'interstate'
  color grey
  end
vpoints archsites
  symbol basic/triangle
  end
end
EOF



Demo 1

the following GRASS 5 ps.map demo scripts need updating for GRASS 6 syntax

scale 1 inch equals 2 miles
maploc 1.25 0.0 
raster soils
colortable
  cols 3
  font Helvetica
  fontsize 10
  end
vector roads
  width 1
  color black
  end
vector streams
  width 1
  color black
  style 111100
  hcolor white
  hwidth 1
  end
labels rush.lbl
  font Helvetica
  end
mapinfo
  end
vlegend
  where 4.25 0.0
  font Helvetica
  fontsize 10
  end
end


Demo 2
scale 1 inch equals 1 mile
maploc 1.5 1.3
raster geology
colortable
  where 5.0 2.5
  font Helvetica
  fontsize 20
  end
vector fields
  width 2
  color black
  end
vector streams
  width 1
  color white
  end
labels rush.lbl
  font Helvetica
  end
mapinfo
  end
vlegend
  end
end


Demo 3
scale 1 inch equals 2 miles
maploc 1.25 1.2
raster fields
outline
  color white
  end
colortable
  cols 4
  font Helvetica
  fontsize 10
  end
vector streams
  width 1
  color black
  end
labels rush.lbl
  font Helvetica
  end
mapinfo
  end
vlegend
  end
end


Demo 4
scale 1 inch equals 2 miles
maploc 1.25 1.1
raster landuse
colortable
  where 1.5 6.0
  font Helvetica
  fontsize 20
  end
mapinfo
  end
end


Demo 5
maploc 0.25 1.5
raster soils
header
  font Courier Bold
  fontsize 15
  end
vector roads
  width 1
  color black
  end
vector streams
  width 1
  color black
  style 111100
  hcolor white
  hwidth 1
  end
mapinfo
  where 6.2 1.6
  font Helvetica
  fontsize 10
  end
vlegend
  where 0.4 6.6
  font Helvetica
  fontsize 10
  end
end


Demo 6
maploc 0.25 1.5
header
  font Helvetica Bold
  fontsize 15
  end
vector roads
  width 1
  color black
  end
vector fields
  width 3
  color green
  end
mapinfo
  end
vlegend
  end
end


Demo 7
scale 1 inch equals 2 miles
maploc 1.25 0.0 
raster soils
grid 1000
  color white
  numbers 1 black
  font Helvetica
  fontsize 10
  end
colortable
  cols 3
  font Helvetica
  fontsize 10
  end
mapinfo
  end
vlegend
  where 4.25 0.0
  font Helvetica
  fontsize 10
  end
end


Demo 8
scale 1 inch equals 2 miles
raster owner
maploc 1.25 0.0
setcolor 2 white
#header
#  file bugs.hdr
#  font Helvetica
#  fontsize 15
#  end
outline y
  color black
  end
sites bugsites
#  icon bug
  color black
  size 1
  desc n
  end
mapinfo
  font Helvetica
  fontsize 10
  end
#comments bugs.cmt
#  where 4.75 10.0
#  font Times Roman
#  fontsize 12
#  end
end


Demo 9
scale 1 inch equals 2 miles
maploc 1.25 0.0 
raster soils
setcolor 0 white
header
  file mask.hdr
  font Helvetica
  fontsize 15
  end
vector roads
  width 1
  color black
  masked y
  end
vector streams
  width 1
  color black
  style 111100
  hcolor white
  hwidth 1
  masked y
  end
mapinfo
  font Helvetica
  fontsize 10
  end
vlegend
  where 4.25 0.0
  font Helvetica
  fontsize 10
  end
end