.XY PACK PLOT AREA
This subroutine adjusts the size and position of the plot area for an XY type chart.
Usage:
PASS <left_x> FIELD SHARE? N
PASS <top_y> FIELD SHARE? N
PASS <right_x> FIELD SHARE? N
PASS <bottom_y> FIELD SHARE? N
PASS <min_width> FIELD SHARE? N
PASS <min_height> FIELD SHARE? N
GOSUB 0CD .XY PACK PLOT AREA
* Check for error
IF 0CD .XY PACK PLOT AREA NE
Description:
This subroutine adjusts the plot area size and position to fit the plot area and the axis labels in a bounding box. You must have initialized the chart as an XY Chart via
.CHART INITIALIZE for this to have any effect.
The first 4 parameters are required. If not passed, the subroutine will cancel. If passed, the values must be between 0-99999 pixels.
In some charts, the axis labels may vary widely and can be very short or very long. It may be difficult to determine the plot area position and size so as to reserve reasonable and sufficient space for the axis labels.
This subroutine adjusts the size and position of the plot area, so that the plot area, together with the axis labels can fit within a given bounding box.
Note that this subroutine only adjusts for the thickness of the primary and secondary axes, and assumes they are at the border of the plot area.
Furthermore, the labels generated by auto-scaling depend on the number of labels that can fit on the axis, which in turn depends on the plot area size. So even if the final plot area size is determined by this subroutine, the
.XY SET PLOT AREA routine must still be used to set a reasonable initial plot area size.
<left_x> the left x coordinate of the bounding box.
<top_y> the top y coordinate of the bounding box.
<right_x> the right x coordinate of the bounding box.
<bottom_y> the bottom y coordinate of the bounding box.
<min_width> the minimum width the plot area can adjust to (Optional).
<min_height> the minimum height the plot area can adjust to (Optional).
To adjust only the plot area width and horizontal position, and leave the height and vertical position unchanged, simply use a bounding box with zero height (eg. set both <top_y> and <bottom_y> to 0). Similarly, to adjust only the height and vertical position, use a bounding box with zero width.
Comments:
Read what other users have said about this page or add your own comments.
--
JeanNeron - 2012-03-15