I have a script which iterates over several columns and generates contour plots.
If the column values are negative I want to reverse the contour colours, so I set a variable like this:
if(col mean( col1 ) < 0, revcols = 1, revcols = 0);
Contour Plot(
...
Reverse Colors( revcols ),
...
However, the problem I have is that the contour plot is now always reversed - it seems to ignore the value of revcols.
If I hardcode
Reverse Colors( 0 )
then it doesn't reverse the colours, but if revcols = 0 then it's reversed.
Do I need to do something clever to make it treat a variable with value 0 as zero in this case?
Thanks!