안녕하세요 여러분
사용자 입력 스크립트의 다음 부분이 있습니다. 스크립트는 실제로 잘 작동합니다. 문제는 jsl을 사용하여 플롯에 그리드 선을 추가하려고 시도했을 때 발생했는데 해당 부분이 작동하지 않는 것 같습니다. X1을 x1col로, Y1을 y1col로 대체하려고 시도했지만 작동하지 않는 것 같습니다. 예를 들어 X1에 마우스를 올리면 올바른 열이 표시됩니다. 끌어서 놓기만 하면 되지만 대규모 데이터 세트 작업과 플롯 생성 작업을 자동화할 수 있다는 것은 좋은 일입니다. 이 문제를 어떻게 극복할 수 있는지 조언해 주십시오.
x1col = Column(dt, X1);
y1col = Column(dt, Y1);
y2col = Column(dt, Y2);
y3col = Column(dt, Y3);
y4col = Column(dt, Y4);
Graph Builder(
Variables(X(Column(dt, X1)), Y(Column(dt, Y1)), Y(Column(dt, Y2)),Y(Column(dt, Y3)),Y(Column(dt, Y4)),
Group X( :Title )
),
Elements( Position( 1, 1 ), Line( X, Y )),
Elements( Position( 1, 2 ), Line( X, Y )),
Elements( Position( 1, 3 ), Line( X, Y )),
Elements( Position( 1, 4 ),
//Bar( X, Y, Legend( 36 ), Summary Statistic( "N" ) )
Bar( X, Y, Summary Statistic( "N" ))),
SendToReport(
Dispatch(
{},
<EM>X1</EM>,
ScaleBox,
{Label Row( Label Orientation( "Vertical" ) )}
),
Dispatch( {}, :<EM>Y1</EM>, ScaleBox, {Label Row( Show Major Grid( 1 ) )} ),
Dispatch(
//{},
<EM>Y2</EM>,
ScaleBox,
{Label Row( Show Major Grid( 1 ) )}
),
Dispatch( {}, <EM>Y3</EM>, ScaleBox, {Label Row( Show Major Grid( 1 ) )} ),
Dispatch( {}, <EM>Y4</EM>, ScaleBox, {Label Row( Show Major Grid( 1 ) )} )
)
),감사합니다.
gzmorgan0님, 감사합니다. 완벽하게 작동합니다!!
GraphBuilder Scale Box Dispatch 문은 열 이름을 원합니다.이를 수행하는 간단한 방법은 다음을 사용하는 것입니다.
colref << getname.
다음은 JMP 샘플 데이터 테이블 Candy Bars.jmp를 사용하여 제공한 스크립트를 약간 수정한 것입니다.
Names Default to Here(1);
//Open the JMP Sample Data table Candy Bars, create a 4x2 display
dt = Open("$Sample_Data/Candy Bars.jmp");
dt << select where(!Contains({"M&M/Mars","Hershey"}, :Brand) );
dt << delete rows();
:Brand << set name("Title");
x1col = Column(dt, "Carbohydrate g");
y1col = Column(dt, "Sugars g");
y2col = Column(dt, "Total fat g");
y3col = Column(dt, "Saturated fat g");
y4col = Column(dt, "Protein g");
candy_gb1 = dt << Graph Builder(
Variables(
X(x1col), Y(y1col), Y(y2col),Y(y3col),Y(y4col),
Group X( :Title )
),
Elements( Position( 1, 1 ), Line( X, Y ) ),
Elements( Position( 1, 2 ), Line( X, Y ) ),
Elements( Position( 1, 3 ), Line( X, Y ) ),
Elements( Position( 1, 4 ),
//Bar( X, Y, Legend( 36 ), Summary Statistic( "N" ) )
Bar( X, Y, Summary Statistic( "N" )) ),
SendToReport(
Dispatch(
{},
x1col<<GETNAME></GETNAME>