Plot/Layout

From J Wiki
Jump to: navigation, search

Each plot requires the calculation of a series of boxes (rectangular screen areas).

These are of two types:

  • frame boxes determine the frame in which the next sequence of plot commands operates.
  • item boxes determine the position of specific graphic items.

User Specified

Calculations are done automatically, but some cases can be specified by the user. These are:

  • Plot Box - isigraph window size, or the parameter to the eps or pdf commands.
  • Sub Box - parameter to the sub command.
  • Draw Box - parameter to the new or use commands.
  • Key Box - position determined by parameters to the keypos option.

Layout Calculations

The layout calculations then determine the frame boxes, in decreasing size:

1. Plot Box, Pxywh - entire graphic window.

2. Sub Box, Sxywh - a subset of Pxywh.

3. Draw Box, Dxywh - area used for the specific plot. If there is only one plot and it takes the entire window, then it is the same as the Sub Plot Box.

The following item boxes are then calculated and positioned so as to avoid overlaps:

  • Title Box, Txywh - for the Title, at the top.
  • Y Caption Box, Yxywh - for the Y Caption, on the left.
  • Y2 Caption Box, Y2xywh - for the second Y axis Caption, on the right.
  • X Caption Box, Xxywh - for the X Caption, at the bottom

4. The inside area remaining is the Out Box, Oxywh, the area available for drawing an outside key. In this case, the key item box is calculated:

  • Key Box, Kxywh - for drawing keys. Positioned now only if it is an outside key.

5. Label Box, Lxywh - area that remains after positioning the outside key item boxe. Labels are drawn in this box.

6. Frame Box, Fxywh - area in which the plot axes are drawn.

7. Graf Box, Gxywh - area in which the data is plotted.

  • If there is an extended frame, it is slightly smaller than the frame. In this case ticmarks appear in the Frame Box, but do not intrude into the Graf Box.
  • Otherwise, it is the same as the Frame Box. Ticmarks will intrude into the drawing area.

8. An inside Key Box is drawn after drawing the rest of the plot.