You can add any kind of graphics to your Graph Builder output by adding an
Add Graphics Script
item to your platform. See the script below:
dt=current data table();
Graph Builder(
Size( 531, 454 ),
Show Control Panel( 0 ),
Variables(
X( :Index ),
Y( :Point estimate ),
Y( :Lower, Position( 1 ) ),
Y( :Upper, Position( 1 ) )
),
Elements(
Points( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 3 ) ),
Line( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 5 ) )
),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
3,
Base( 0, 0, 0, Item ID( "Point estimate", 1 ) ),
Base( 1, 0, 0, Item ID( "Lower", 1 ) ),
Base( 2, 0, 0, Item ID( "Upper", 1 ) ),
Properties( 0, {Line Color( 0 )}, Item ID( "Point estimate", 1 ) ),
Properties( 1, {Line Color( 0 )}, Item ID( "Lower", 1 ) ),
Properties( 2, {Line Color( 0 )}, Item ID( "Upper", 1 ) )
), Legend Model(
5,
Properties( 0, {Line Color( 0 )}, Item ID( "Point estimate", 1 ) ),
Properties( 1, {Line Color( 0 )}, Item ID( "Lower", 1 ) ),
Properties( 2, {Line Color( 0 )}, Item ID( "Upper", 1 ) )
)}
),
Dispatch(
{},
"Graph Builder",
FrameBox,
{Add Graphics Script(
2,
Description( "Script" ),
dt = Current Data Table();
yMatrix = dt:upper << get values |/
Matrix( Reverse( As List( dt:lower << get values ) ) );
xMatrix = dt:index << get values |/
Matrix( Reverse( As List( dt:index << get values ) ) );
Fill Color( "yellow" );
Polygon( xMatrix, yMatrix );
), Grid Line Order( 1 ), Reference Line Order( 3 )}
)
)
);
Jim