How to Position Graphs on a PostScript Page

One way to position a graph is to specify the size of the graph, then offset its location.

Set_plot, 'PS'
Device, Filename = 'psfile.ps'
Device, /inches, xsize=7, ysize=8     ;the default units for postscript are centimeters
This code will produce a graph with an overall size of 7" x 8" (not just the length of the axes).  For some reason, when written to the postscript file, the graph will be shoved too far up and the top part will be cut off.  To fix this, you must set an offset.  The offsets are referenced from the lower left corner.
Set_plot, 'PS'
Device, Filename = 'psfile.ps'
Device, /inches, xsize=7, ysize=8, xoffset=0.5, yoffset=1
Adding the offset values causes the graph to be moved to the lower left corner, then moved the number of inches to the right/up.  Another way to think of this is that the x and y offsets move the graph from the lower left corner, but if no offset is used, the graph is located in an arbitrary location (usually moved too far up).

If a landscape orientation is used, the offset directions are not changed, but the page is rotated 90degrees counterclockwise.  While looking at the rotated page, the xoffset now moves the graph vertically, and the yoffset moves the graph to the left.  See Figure 8-1 in the IDL Reference Guide for an illustration.

Set_plot, 'PS'
Device, Filename = 'psfile.ps', /landscape
Device, /inches, xsize=3, ysize=3, xoffset=1, yoffset=6
This code will make the graph rise just 1" off the bottom of the page, but shoves it substantially to the left side of the landscape page.  This image is an approximation of what the code actually does:



Another way to position graphs is with !p.positon:
!p.position, (0.2, 0.1, 0.8, 0.9)                 ; (x0, y0, x1, y1)
plot, x, y
This code creates a plot which starts 20% in from left side of the page, and 10% up from the bottom.  The plot fills the page up to 20% from the right side and 10% down from the left.

An example of using "position" to place strings instead of axis titles is shown in "title."