如何在圖中自訂 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>