Plot2D.SetGraphAreaMargins

Prototypes

void SetGraphAreaMargins( double dLeft, double dRight, double dTop, double dBottom <, boolean bPreserveFixedAspectRatio> )

Parameters

double dLeft
If dLeft is greater than or equal to 0, it specifies the left margin of the Graph Area as a fraction of the Graph Area's width. In this case, dLeft must be in the range 0 to 1.0. If dLeft is negative, the left margin is not changed.

double dRight
If dRight is greater than or equal to 0, it specifies the right margin of the Graph Area as a fraction of the Graph Area's width. In this case, dRight must be in the range 0 to 1.0. If dRight is negative, the right margin is not changed.

double dTop
If dTop is greater than or equal to 0, it specifies the top margin of the Graph Area as a fraction of the Graph Area's height. In this case, dTop must be in the range 0 to 1.0. If dTop is negative, the top margin is not changed.

double dBottom
If dBottom is greater than or equal to 0, it specifies the bottom margin of the Graph Area as a fraction of the Graph Area's height. In this case, dBottom must be in the range 0 to 1.0. If dBottom is negative, the bottom margin is not changed.

boolean bPreserveFixedAspectRatio
If the plot is in fixed aspect ratio mode and bPreserveFixedAspectRatio is true, this method restores the aspect ratio of the Plot Area after applying the new Graph Area margins. If the plot is in fixed aspect ratio mode and bPreserveFixedAspectRatio is false, this method causes the plot to exit fixed aspect ratio mode. If the plot is not in fixed aspect ratio mode, this parameter has no effect. Calling this method without specifying the bPreserveFixedAspectRatio parameter is equivalent to calling it with bPreserveFixedAspectRatio equal to false.

Remarks

This method sets the margins of the Graph Area. The sum of opposing margin values must be in the range 0 to 1.0.

This method is an enhanced version of the method Plot.SetGraphAreaMargins. Calling Plot2D.SetGraphAreaMargins with the parameter bPreserveFixedAspectRatio set to false is identical to calling the method Plot.SetGraphAreaMargins.

For information about fixed aspect ratio mode, see Plot2D.SetAspectRatio.

Example
x = 1:10;
y = { 7 5 3 2 4 10 12 9 5 2 };
declare ScatterPlot plot;
plot = ScatterPlot.Create( "Example", x, y );
plot.SetAspectRatio( 1 );
plot.SetGraphAreaMargins( .2, .1, .2, .3, true );
See Also

Plot2D.SetAspectRatio
Plot.SetGraphAreaMargins