ghostscript Syndicate content

warning: Creating default object from empty value in /www/htdocs/w0065fc9/milianw/modules/taxonomy/taxonomy.pages.inc on line 33.

» How to generate proper DIN A4 sized plots with Gnuplot

Fri, 05/16/2008 - 21:04

I’ve had a major annoyance today: The plot generated by gnuplot looked good inside the wxt terminal but I simply couldn’t get a proper fullsized DIN A4 postscript exported. This is how I’ve done it now:

  1. Inside gnuplot:
    1. set size ratio 0.71 # this is the ratio of a DIN A4 page (21/29.7)
    2. set terminal postscript enhanced landscape "Arial" 9 # you can change landscape to portrait and the fontname and -size
    3. set output 'yourfilename.ps' # this is your export file
    4. replot # or put your custom plot command here
  2. In a shell:
    1. ps2ps -sPAGESIZE=a4 yourfilename.ps new_dina4_file.ps
  3. Now you can simply print `new_dina4_file.ps` from within KGhostView for example. Have fun!