Here is a simple example of how you can change the polygon to match the axis settings.
Names Default To Here( 1 );
dt = New Table( "Sample",
Add Rows( 7 ),
New Column( "Column 1",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.65] )
),
New Column( "Column 2",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [0.2, 0.3, 0.25, 0.3, 0.55, 0.68, 0.9] )
)
);
gb = Graph Builder(
Size( 528, 454 ),
Show Control Panel( 0 ),
Variables( X( :Column 1 ), Y( :Column 2 ) ),
Elements( Points( X, Y, Legend( 5 ) ) ),
SendToReport(
Dispatch(
{},
"Column 1",
ScaleBox,
{Min( -0.0389121338912134 ), Max( 1.21814306472226 ), Inc( 0.2 ), Minor Ticks( 1 ),
Label Row(
{Major Grid Line Color( 1 ), Minor Grid Line Color( 1 ), Show Major Grid( 1 ),
Show Minor Grid( 1 )}
)}
),
Dispatch(
{},
"Column 2",
ScaleBox,
{Min( -0.05302734375 ), Max( 1.20978927612305 ), Inc( 0.2 ), Minor Ticks( 2 ),
Label Row(
{Major Grid Line Color( 1 ), Minor Grid Line Color( 1 ), Show Major Grid( 1 ),
Show Minor Grid( 1 )}
)}
)
)
);
Report( gb )[FrameBox( 1 )] << Add Graphics Script(
Pen Size( 4 );
Line Style( dashed );
Pen Color( "black" );
Y Function( x, x );
Pen Size( 4 );
Line Style( dashed );
Pen Color( "red" );
Y Function( 1.1 * x, x );
Pen Size( 4 );
Line Style( dashed );
Pen Color( "red" );
Y Function( .9 * x, x );
Transparency( 0.5 );
Fill Color( {0.38, 0.84, 0.67} );
xMat = [0.05];
yMat = [.045];
xMax = Report( gb )[AxisBox( 2 )] << get max;
xMat = xMat || xMax || xMax || [0.045];
yMat = yMat || xMax * 1.1 || xMax * .9 || [0.055];
Polygon( xMat, yMat );
);
Jim