빨간색 참조선에 라벨을 추가하는 방법은 무엇입니까?안녕,
참조선에 라벨을 어떻게 추가할 수 있나요?
내 코드는 다음과 같습니다.
어떤 충고?
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이 내 시스템에서 제대로 작동합니다.축 되돌리기의 문제는 축의 내용이 변경된 경우 축 되돌리기가 실행될 때 원래 설정으로 돌아간다는 것입니다.따라서 실제 축 범위 또는 증분이 변경된 경우 축 되돌리기는 축을 원래 위치로 다시 이동시킵니다.귀하가 겪고 있는 문제는 타이밍 문제일 가능성이 있다고 생각하므로 문제를 해결할 수 있을 것으로 생각되는 Wait(0)를 추가했습니다.또한 가변성 플랫폼에 가중치 열을 추가한 후 더 이상 올바른 차트를 가리키지 않았습니다.변경 후 출력 표시 구조가 변경됩니다.이제 2개의 별도 보고 분기가 있습니다.
기가바이트[1]
그리고
기가바이트[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: 빨간색 참조선에 라벨을 추가하는 방법은 무엇입니까?다음은 참조 라인 추가를 사용하여 동적 라인을 표시하는 코드 재작업입니다.

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: 빨간색 참조선에 라벨을 추가하는 방법은 무엇입니까?그래픽 스크립트를 프레임 상자 외부로 이동할 수 있는지 잘 모르겠지만, 프레임 상자 내부에 레이블을 넣어도 괜찮다면

그래픽 스크립트에 텍스트를 추가할 수 있습니다.
Text Color("Red");
Text({0, LL}, "Lower");
Text({0, UL}, "Upper");Re: 빨간색 참조선에 라벨을 추가하는 방법은 무엇입니까?@제드_캠벨 감사해요. 슬라이더 상자를 사용하여 참조선을 동적으로 이동하고 싶습니다. 참조선 추가는 슬라이더 상자를 변경해도 동적으로 이동하지 않습니다.
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: 빨간색 참조선에 라벨을 추가하는 방법은 무엇입니까?