如何在图中自定义 XY 网格间距?在下面的示例脚本生成的图中,如何获得一个自定义网格,比如在 X 轴和 Y 轴上间隔 25 个网格(并使用选定的颜色为网格线着色并增加网格线的线宽)?
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 )} )}
)
)
);右键单击生成的图表并查看自定义选项并没有提供我想要的选项。
谢谢。
自动化和脚本基础数据分析与建模回复:如何在图中自定义 XY 网格间距?这是一个修改过的脚本,除了调整网格线的宽度外,它可以完成你想要的一切
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");我找不到调整轴网格线粗细的方法。一种解决方法是添加参考线到网格线层级。
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>