Plot.GetGraphAreaMargins

Prototypes

void GetGraphAreaMargins( Matrix mLeft, Matrix mRight, Matrix mTop, Matrix mBottom )

Parameters

Matrix mLeft
Upon return, contains the left margin of the Graph Area.

Matrix mRight
Upon return, contains the right margin of the Graph Area.

Matrix mTop
Upon return, contains the top margin of the Graph Area.

Matrix mBottom
Upon return, contains the bottom margin of the Graph Area.

Remarks

This method retrieves the plot's Graph Area margins. These margin values are in the range [0, 1] and represent fractions of the Graph Area's width or height.

The Graph Area margins determine the location of the Plot Area.

Example
x = -5:5;
y = x##2;
declare ScatterPlot plot;
plot = ScatterPlot.Create( "Quadratic", x, y );
plot.GetGraphAreaMargins( left, right, top, bottom );
plot.GetGraphAreaWidthHeight( width, height );
plot.DrawSetRegion( GRAPHFOREGROUND );
/* Use pixel coordinate system */
plot.DrawUseNormalizedCoordinates( 0, width, 0, height );
plot.DrawSetPenColor( RED );
plotLeft = left*width;
plotRight = (1-right)*width;
plotTop = (1-top)*height;
plotBottom = bottom*height;
plot.DrawRectangle( plotLeft, plotBottom,
plotRight, plotTop );
plot.DrawSetTextSize( 24 );
plot.DrawText( (plotLeft+plotRight)/2, (plotTop+plotBottom)/2,
    "Plot Area" );
See Also

Plot.GetPlotAreaMargins
Plot.SetGraphAreaMargins