RLPlot from the command line

Exprlp is a console application which reads RLPlot *.rlp files and converts them to other vector formats. The major objective for using exprlp is server sided scripting.
The program exprlp is built automatically with the Linux Makefile or can be built separately by executing make exprlp in the RLPlot source directory. The latter possibility can also be used to build it on servers where no Qt or graphical user interface is installed. Exprlp should be buildable on any *nix system.
If you are using Linux and RLPlot is installed, exprlp is most likely also present. Just enter exprlp -v from the prompt and exprlp will issue some version information. Enter exprlp -h for a complete list of command line options.
Exprlp reads RLPlot files and exports various vector based graphic file formats including scaleable vector graphics (SVG) and Encapsulated PostScript (EPS).
Supposed you saved a file (e.g. from RLPlot) named foo.rlp. It is converted to SVG using the command
exprlp foo.rlp foo.svg.
However, exporting SVG from a server sided script is still not generally acceptable. In most cases you might wish to create a bitmap which is included in the web page. This requires that a vector drawing is rasterized by another program.

Using Ghostscript to rasterize graphs

Ghostscript is usually invoked in a script by a command similar to
gs-sDEVICE=png16 -r100 -g630x434 -sOutputFile=foo.png foo.eps
A common practice with command line programs is to pipe their output to another application. This possibility may be used to create bitmaps or images from RLPlot files. If we use the same file as above we might enter the following command to create foo.png from foo.rlp:
exprlp -eq foo.rlp - | gs -sDEVICE=png16 -r100 -g630x434 -sOutputFile=foo.png -
In this example the file foo.rlp is read by exprlp and converted to EPS directing the output to stdout. This output is piped to gs, reading from stdin. Gs now creates a 630x434 pix bitmap with a resolution of 100 dpi. The bitmap size given to gs must match the size of the RLPlot graph. Assume a graph of 6.3 inch width and 4.34 inch height (160x110 mm, the RLPlot default settings) the above values are to be used for the given resolution. Gs writes the bitmap to foo.png. See the gs man page for additional information.

Using ImageMagick to rasterize graphs

ImageMagick comes with a command line tool, convert, which is able to rasterize SVG, even in the very restricted environment of a server sided script. The file foo.svg is converted to foo.png by the command:
convert foo.svg foo.png.
See the ImageMagick documentation for further details.

Automatic scaling of graphs

Automatic scaling of Graphs is under control of a [Graph] object. The central caling Information is maintained in the Bounds record. If this record is not valid, e.g. maxima are not greater than minima, automatic scaling is initiated. Similarly the definition in Xaxis and Yaxis must be valid, otherwise automatic scaling is done. During calculation of minima and maxima the actual values of the Bounds record is included. If, for example, y-min and y-max are set to zero in the *rlp file but all other values of the Graph are greater zero, the y-axis will have a lower limit of zero.
Source file intended for automatic scaling have the Bounds member set to an invalid configuration for the respective axis. The minima and maxima in Xaxis and Yaxis should be set to the same values. These files need not contain any [Tick] or tick labels - they are created during automatic scaling. Existing ticks and tick labels are removed after scaling and replaced by new ticks and labels.
For a successful autoscale file the respective [Axis] and <Axis definitions> must have the AXIS_AUTOSCALE and AXIS_AUTOTICK (bits 8 and 10) flags set - this is the default!