API documentation for visualization library

Michael Galloy

single page | use frames     summary     class     fields     routine details     file attributes



includes main-level program

top vis_psfrag

vis_psfrag [, filename] [, output_filename] [, xsize=float] [, ysize=float] [, /inches]

Processes specially formatted text output in .ps and .eps files with LaTeX.

Keyword values to graphics command expecting strings to output as text can be set to values like:

\tex[<posn>][<psposn>][<scale>][<rot>]{LATEX text}
where posn and psposn are positions and can be one of the following:
bl = bottom left c = center t = top r = right B = baseline
The parameter is used in place of the CHARSIZE keyword, which will be ignored.

This routine requires sed, latex, and dvips to be installed and available in the system path. Also, ps2eps is needed to if the file to be created is an .eps file.


filename in optional type=string default=idl.ps

filename of PS or EPS file to substitue text in

output_filename in optional type=string default=filename

filename of output PS file


xsize in optional type=float default=17.78

width of graphic in cm

ysize in optional type=float default=12.7

height of graphic in cm

inches in optional type=boolean

set to specify sizes in inches instead of centimeters


See the main-level program at the end of this file. To run it:

IDL> .run vis_psfrag
Produce a .ps or .eps file with text output inside a \tex{}. This text will be translated by LaTeX:
set_plot, 'ps' device, filename='figure.eps', /times, /encapsulated xyouts, 3., 5., '\tex[bl][bl][3.0]{Sun symbol: $M_\odot$}', font=0 plot, findgen(10), /nodata device, /close
Note: the entire text must be the \tex{} phrase, it cannot be combined with normal output like:
xyouts, 3., 5., 'Sun symbol: \tex[bl][bl][3.0]{$M_\odot$}', font=0
Then run VIS_PSFRAG on the output:
vis_psfrag, 'figure.eps', 'figure-subs.eps'
This should produce output like:

File attributes

Modification date: Fri Jun 3 16:12:40 2011
Lines: 168
Docformat: rst rst