Ps.map scripts: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
(tips section)
(add some tips)
Line 1: Line 1:
* The [http://grass.ibiblio.org/grass63/manuals/html63_user/ps.map.html ps.map help page].
* The [http://grass.ibiblio.org/grass63/manuals/html63_user/ps.map.html ps.map help page].


* [[psmap_simple_example|Simple ps.map example]] ([http://grass.ibiblio.org/download/data6.php Spearfish dataset])
* [[psmap_simple_example|Simple ps.map examples]] ([http://grass.ibiblio.org/download/data6.php Spearfish dataset])


* Example showing all standard vareas [[psmap_fill_patterns|fill pattern hatches]]. (Spearfish dataset)
* Example showing all standard vareas [[psmap_fill_patterns|fill pattern hatches]]. (Spearfish dataset)
Line 17: Line 17:


* If you want to show a number of raster maps side by side in a paneled figure you will have to do it in a two step process. The first step is to create each panel as an EPS file, the second step is to include these EPS files in the ps.map command file. [[psmap_multi_pane_example|Here is an example script demonstrating this]].
* If you want to show a number of raster maps side by side in a paneled figure you will have to do it in a two step process. The first step is to create each panel as an EPS file, the second step is to include these EPS files in the ps.map command file. [[psmap_multi_pane_example|Here is an example script demonstrating this]].
=== PostScript files are plain text files! ===
To fix typos, insert special characters, etc., you can open the PostScript file in your favorite industrial-strength text editor, search for the text string, make the edit and resave. Much easier then regenerating the graph for something as simple as a spelling mistake or a figure number change.
=== Converting PostScript to PDF ===
[http://pages.cs.wisc.edu/~ghost/doc/AFPL/6.50/Ps2pdf.htm ps2pdf] is a GhostScript wrapper for converting PostScript files to PDF. The default is to create PDF with rasters sampled at 72dpi for viewing on a computer screen. To render at 1200dpi with defaults set for high quality printing, you can add some gs options to the operation:
ps2pdf -dPDFSETTINGS=/preprint -r1200 filename.ps
* See also: [http://www.grassbook.org/neteler/highres_pdf.html Creating High Resolution PDF files for book production with Open Source tools] by Markus Neteler.
=== PFD files are simply containerized PostScript files! ===
Well, perhaps it is better to say they are an evolution. If you uncompress the PDF file you can edit it just as in the PostScript editing example above, and then recompress when you are done. A nice tool to compress/decompress PDF is [http://www.accesspdf.com/pdftk/ pdftk].




[[Category:Documentation]]
[[Category:Documentation]]
[[Category:FAQ]]
[[Category:FAQ]]

Revision as of 10:09, 3 July 2008


Tips

While any number of vector maps can be drawn, ps.map will only let you draw one raster image or RGB image set per map.

  • If you want to show two or more overlapping raster maps you need to combine them with the r.patch module or r.mapcalc's '#' color operator.
(see also the r.his and r.composite modules)
  • If you want to show a number of raster maps side by side in a paneled figure you will have to do it in a two step process. The first step is to create each panel as an EPS file, the second step is to include these EPS files in the ps.map command file. Here is an example script demonstrating this.

PostScript files are plain text files!

To fix typos, insert special characters, etc., you can open the PostScript file in your favorite industrial-strength text editor, search for the text string, make the edit and resave. Much easier then regenerating the graph for something as simple as a spelling mistake or a figure number change.

Converting PostScript to PDF

ps2pdf is a GhostScript wrapper for converting PostScript files to PDF. The default is to create PDF with rasters sampled at 72dpi for viewing on a computer screen. To render at 1200dpi with defaults set for high quality printing, you can add some gs options to the operation:

ps2pdf -dPDFSETTINGS=/preprint -r1200 filename.ps


PFD files are simply containerized PostScript files!

Well, perhaps it is better to say they are an evolution. If you uncompress the PDF file you can edit it just as in the PostScript editing example above, and then recompress when you are done. A nice tool to compress/decompress PDF is pdftk.