Next: , Previous: PostScript Graphing, Up: PostScript Graphing Column Ranges

A range is a list of two numbers, the minimum and the maximum. Ranges can be given explicity or computed in PostScript by column-range.

— Function: column-range array k

Returns the range of values in 2-dimensional array column k.

— Function: pad-range range p

Expands range by p/100 on each end.

— Function: snap-range range

Expands range to round number of ticks.

— Function: combine-ranges range1 range2 ...

Returns the minimal range covering all range1, range2, ...

— Function: setup-plot x-range y-range pagerect
— Function: setup-plot x-range y-range

x-range and y-range should each be a list of two numbers or the value returned by pad-range, snap-range, or combine-range. pagerect is the rectangle bounding the graph to be drawn; if missing, the rectangle from the top of the PostScript stack is popped and used.

Based on the given ranges, setup-plot sets up scaling and margins for making a graph. The margins are sized proportional to the fontheight value at the time of the call to setup-plot. setup-plot sets two variables:

The region where data points will be plotted.
The pagerect argument to setup-plot. Includes plotrect, legends, etc.