How to generate proper DIN A4 sized plots with Gnuplot

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


Want to comment? Send me an email!

Comment by Stefan (not verified) (2011-01-14 15:34:00)

Thanks! This was very useful for me.

Published on January 14, 2011.