赤い基準線にラベルを追加するにはどうすればよいですか?こんにちは、
参照線にラベルを追加するにはどうすればよいですか?
私のコードは次のとおりです。
何かアドバイス?
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
sliderValue = 1;
dothisonchange = Function( {val},
tb << Set Text( "Cpk : " || Substr( Char( val ), 1, 4 ) )
);
Mean = 60;
std = 0.5;
New Window( "",
H List Box(
V List Box(
tb = Text Box( "Value: " || Char( sliderValue ) ),
sb = Slider Box(
1,
3,
sliderValue,
<<SET function=""></SET>
マスカスタマイゼーションRe: 赤い基準線にラベルを追加するにはどうすればよいですか?。
Re: 赤い基準線にラベルを追加するにはどうすればよいですか?Remove Ref Line は私のシステムでは正常に機能します。Revert Axis の問題は、軸上の何かが変更されている場合、Revert Axis を実行すると元の設定に戻ってしまうということです。したがって、実際の軸の範囲または増分が変更されている場合、軸を元に戻すと、軸が元の状態に戻ります。あなたが抱えていた問題はおそらくタイミングの問題だと思うので、問題を解決できると信じて Wait(0) を追加しました。また、変動プラットフォームに重み列を追加した後、正しいチャートを指さなくなりました。その変更後、出力表示構造が変更されます。現在、2 つの別個のレポート ブランチが存在します。
gb[1]
そして
gb[2]
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
sliderValue = 1;
dothisonchange = Function( {val},
tb << Set Text( "Cpk : " || Substr( Char( val ), 1, 4 ) )
);
Flag = 0;
Mean = 60;
wMean = 105;
wstd = 2;
std = 0.5;
LL = Mean - (sliderValue * 3 * std);
UL = Mean + (sliderValue * 3 * std);
holdLL = LL;
holdUL = UL;
wLL = wMean - (sliderValue * 3 * wstd);
wUL = wMean + (sliderValue * 3 * wstd);
wholdLL = LL;
wholdUL = UL;
New Window( "",
H List Box(
V List Box(
tb = Text Box( "Value: " || Char( sliderValue ) ),
sb = Slider Box(
1,
3,
sliderValue,
sliderValue = sb << Get;
LL = Mean - (sliderValue * 3 * std);
UL = Mean + (sliderValue * 3 * std);
wLL = wMean - (sliderValue * 3 * wstd);
wUL = wMean + (sliderValue * 3 * wstd);
//Set the slider and call the other function
sb << Set( sliderValue );
gbfb1 = Report( gb[1] )[AxisBox( 1 )];
gbfb2 = Report( gb[2] )[AxisBox( 1 )];
LL = Mean - (sliderValue * 3 * std);
UL = Mean + (sliderValue * 3 * std);
wLL = wMean - (sliderValue * 3 * wstd);
wUL = wMean + (sliderValue * 3 * wstd);
//gbfb1 << revert axis;
try(gbfb1 << remove ref line(holdLL));
try(gbfb1 << remove ref line(holdUL));
try(gbfb2 << remove ref line(wholdLL));
try(gbfb2 << remove ref line(wholdUL));
wait(0);
If( Flag == 1,
gbfb1 << add ref line( LL, Solid, red, "LL" );
gbfb1 << add ref line( UL, Solid, red, "UL" );
gbfb2 << add ref line( wLL, Solid, red, "LL" );
gbfb2 << add ref line( wUL, Solid, red, "UL" );
);
holdLL = LL;
holdUL = UL;
wholdLL = wLL;
wholdUL = wUL;
dothisonchange( sliderValue );
),
Button Box( "Add Reference line",
If( Flag == 0,
Flag = 1;
gbfb1 = Report( gb[1] )[AxisBox( 1 )];
gbfb2 = Report( gb[2] )[AxisBox( 1 )];
LL = Mean - (sliderValue * 3 * std);
UL = Mean + (sliderValue * 3 * std);
wLL = wMean - (sliderValue * 3 * wstd);
wUL = wMean + (sliderValue * 3 * wstd);
try(gbfb1 << remove ref line(holdLL));
try(gbfb1 << remove ref line(holdUL));
try(gbfb2 << remove ref line(wholdLL));
try(gbfb2 << remove ref line(wholdUL));
gbfb1 << add ref line( LL, Solid, red, "LL" );
gbfb1 << add ref line( UL, Solid, red, "UL" );
gbfb2 << add ref line( wLL, Solid, red, "LL" );
gbfb2 << add ref line( wUL, Solid, red, "UL" );
dothisonchange( sliderValue );
)
)
)
),
V List Box(
gb = dt << Variability Chart(
Y( :height, : weight ),
X( :sex ),
Show Range Bars( 0 ),
Std Dev Chart( 0 ),
Points Jittered( 1 )
);
)
);
変更がどのように処理されるかについては、新しいコードを参照してください。
Re: 赤い基準線にラベルを追加するにはどうすればよいですか?@txnelson参照行の削除が機能しません。 リバース軸が出てきました。
別の質問: たとえば、身長と体重の 2 つの変動グラフを実行している場合、両方に基準線を追加し、スライダー ボックスで変動させたいと考えています。 どうすればそれを実装できるでしょうか?
これが軸を戻すコードです。両方の変動チャートに基準線を追加し、スライダー ボックスで基準線を変更したいと考えています。
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
sliderValue = 1;
dothisonchange = Function( {val},
tb << Set Text( "Cpk : " || Substr( Char( val ), 1, 4 ) )
);
Flag = 0;
Mean = 60;
std = 0.5;
LL = Mean - (sliderValue * 3 * 0.5);
UL = Mean + (sliderValue * 3 * std);
holdLL = LL;
holdUL = UL;
New Window( "",
H List Box(
V List Box(
tb = Text Box( "Value: " || Char( sliderValue ) ),
sb = Slider Box(
1,
3,
sliderValue,
sliderValue = sb << Get;
LL = Mean - (sliderValue * 3 * std);
UL = Mean + (sliderValue * 3 * std);
//Set the slider and call the other function
sb << Set( sliderValue );
gbfb1 = Report( gb )[AxisBox( 1 )];
LL = Mean - (sliderValue * 3 * std);
UL = Mean + (sliderValue * 3 * std);
gbfb1 << revert axis;
If( Flag == 1,
gbfb1 << add ref line( LL, Solid, red, "LL" );
gbfb1 << add ref line( UL, Solid, red, "UL" );
);
holdLL = LL;
holdUL = UL;
dothisonchange( sliderValue );
),
Button Box( "Add Reference line",
If( Flag == 0,
Flag = 1;
gbfb1 = Report( gb )[AxisBox( 1 )];
LL = Mean - (sliderValue * 3 * 0.5);
UL = Mean + (sliderValue * 3 * std);
gbfb1 << revert axis;
gbfb1 << add ref line( LL, Solid, red, "LL" );
gbfb1 << add ref line( UL, Solid, red, "UL" );
dothisonchange( sliderValue );
)
)
)
),
V List Box(
gb = dt << Variability Chart(
Y( :height, : weight ),
X( :sex ),
Show Range Bars( 0 ),
Std Dev Chart( 0 ),
Points Jittered( 1 )
);
)
);Re: 赤い基準線にラベルを追加するにはどうすればよいですか?これは、動的行を表示するために add ref line を使用するコードの再加工です。

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
sliderValue = 1;
dothisonchange = Function( {val},
tb << Set Text( "Cpk : " || Substr( Char( val ), 1, 4 ) )
);
Flag = 0;
Mean = 60;
std = 0.5;
LL = Mean - (sliderValue * 3 * 0.5);
UL = Mean + (sliderValue * 3 * std);
holdLL = LL;
holdUL = UL;
New Window( "",
H List Box(
V List Box(
tb = Text Box( "Value: " || Char( sliderValue ) ),
sb = Slider Box(
1,
3,
sliderValue,
sliderValue = sb << Get;
LL = Mean - (sliderValue * 3 * std);
UL = Mean + (sliderValue * 3 * std);
//Set the slider and call the other function
sb << Set( sliderValue );
gbfb1 = Report( gb )["Graph Builder"][AxisBox( 2 )];
LL = Mean - (sliderValue * 3 * 0.5);
UL = Mean + (sliderValue * 3 * std);
Try( gbfb1 << remove ref line( holdLL ) );
Try( gbfb1 << remove ref line( holdUL ) );
If( Flag == 1,
gbfb1 << add ref line( LL, Solid, red, "LL" );
gbfb1 << add ref line( UL, Solid, red, "UL" );
);
holdLL = LL;
holdUL = UL;
dothisonchange( sliderValue );
),
Button Box( "Add Reference line",
If( Flag == 0,
Flag = 1;
gbfb1 = Report( gb )["Graph Builder"][AxisBox( 2 )];
LL = Mean - (sliderValue * 3 * 0.5);
UL = Mean + (sliderValue * 3 * std);
Try( gbfb1 << remove ref line( holdLL ) );
Try( gbfb1 << remove ref line( holdUL ) );
gbfb1 << add ref line( LL, Solid, red, "LL" );
gbfb1 << add ref line( UL, Solid, red, "UL" );
dothisonchange( sliderValue );
)
)
)
),
V List Box(
gb = dt << Variability Chart(
Y( :height ),
X( :sex ),
Show Range Bars( 0 ),
Std Dev Chart( 0 ),
Points Jittered( 1 )
);
gb = dt << Graph Builder(
Size( 373, 325 ),
Show Control Panel( 0 ),
Variables( X( Transform Column( "Row", Formula( Row() ) ) ), Y( :height ) )
);
)
);Re: 赤い基準線にラベルを追加するにはどうすればよいですか?スライダー スクリプトは、変数が変更されたときに前の参照行を削除し、新しい行を追加する必要があります。
Re: 赤い基準線にラベルを追加するにはどうすればよいですか?グラフィックス スクリプトを Frame Box の外に移動できるかどうかはわかりませんが、FrameBox 内にラベルを入れても問題ない場合は、

グラフィックスクリプトにテキストを追加できます
Text Color("Red");
Text({0, LL}, "Lower");
Text({0, UL}, "Upper");Re: 赤い基準線にラベルを追加するにはどうすればよいですか?@Jed_Campbellありがとう。 スライダーボックスを使用して基準線を動的に移動させたい。 参照線の追加は、スライダー ボックスを変更しても動的に移動しません。
Re: 赤い基準線にラベルを追加するにはどうすればよいですか?この問題を回避するには、Add Graphics Script コードを使用する代わりに、Add Ref Line を使用できますか?
Graph Builder(
Transform Column( "Row", Formula( Row() ) ),
Variables( X( :Row ), Y( :height ) ),
Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) ),
SendToReport(
Dispatch(
{},
"Row",
ScaleBox,
{Add Ref Line( LL, "Solid", "Black", "My Label", 1 )}
)
)
);Re: 赤い基準線にラベルを追加するにはどうすればよいですか?おそらくこれ:グラフに参照線を追加する
Re: 赤い基準線にラベルを追加するにはどうすればよいですか?