Thanks for the suggestion, but still no luck. I tried this:
// Code as run
Clear Globals();
rev = 0;
Eval(
Substitute(
Expr(
Contour Plot(
X( :height, :weight ),
Y( :age ),
Show Data Points( 0 ),
Fill Areas( 1 ),
Label Contours( 0 ),
Reverse Colors( __reverse__ ),
Transform( "Range Normalized" ),
Specify Contours( Min( 12.5 ), Max( 16.5 ), N( 9 ) ),
SendToReport(
Dispatch(
{},
"Contour Plot for age",
OutlineBox,
{Set Title( "Contour Plot for age, with rev = " || Char( __reverse__ ) || " using substitute" )}
)
)
)
),
Expr( __reverse__ ), rev
)
);
However, the chart still came out with reversed colours. If I save the script from the chart, I get this:
// code from Save Script
Contour Plot(
X( :height, :weight ),
Y( :age ),
Show Data Points( 0 ),
Fill Areas( 1 ),
Label Contours( 0 ),
Reverse Colors( 1 ),
Transform( "Range Normalized" ),
Specify Contours( Min( 12.5 ), Max( 16.5 ), N( 9 ) ),
SendToReport(
Dispatch(
{},
"Contour Plot for age",
OutlineBox,
{Set Title( "Contour Plot for age, with rev = 0 using substitute" )}
)
)
);
As you can see, the value of __reverse__ has been correctly substituted into the title text, but for some reason I still get
Reverse Colors( 1 )
Is this a bug and is there a workaround?
Thanks for your help!