How to have custom X-Y grid spacing in a plot?In the plot generated by the example script below, how do I have a custom grid say spaced 25 apart on both X & Y axis (and color the grid lines with a chosen color and increase line width of the grid lines)?
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Little Pond.jmp" );
dt << Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 0 ),
Fill Areas( 0 ),
Label Contours( 0 ),
Transform( "Range Normalized" ),
Specify Contours( Min( -4 ), Max( 8 ), N( 7 ) ),
SendToReport(
Dispatch(
{},
"1",
ScaleBox,
{Label Row( {Show Major Grid( 1 ), Show Minor Grid( 1 )} )}
),
Dispatch(
{},
"2",
ScaleBox,
{Label Row( {Show Major Grid( 1 ), Show Minor Grid( 1 )} )}
)
)
);Right clicking on the generated chart and looking at the customize option does not give me desired options.
Thanks.
Automation and ScriptingBasic Data Analysis and ModelingRe: How to have custom X-Y grid spacing in a plot?Here is a modified script that does everything you want, except the adjusting the width of the grid lines
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Little Pond.jmp" );
cont_plot = dt << Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 0 ),
Fill Areas( 0 ),
Label Contours( 0 ),
Transform( "Range Normalized" ),
Specify Contours( Min( -4 ), Max( 8 ), N( 7 ) ),
);
report(cont_plot)[axis box(1)]<< show major grid(1);
report(cont_plot)[axis box(2)]<< show major grid(1);
report(cont_plot)[axis box(1)]<< inc(25);
report(cont_plot)[axis box(2)]<< inc(25);
report(cont_plot)[axis box(1)]<< Major Grid Line Color("red");
report(cont_plot)[axis box(2)]<< Major Grid Line Color("red");I cannot see a way to adjust the thickness of the axis gridlines. One hack to do this would be to add reference lines the grid line levels.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Little Pond.jmp" );
cont_plot = dt << Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 0 ),
Fill Areas( 0 ),
Label Contours( 0 ),
Transform( "Range Normalized" ),
Specify Contours( Min( -4 ), Max( 8 ), N( 7 ) ),
);
for each({val}, 0::400::25,
report(cont_plot)[axis box(2)]<<ADD ref="" line=""></ADD>