JSL을 사용하여 그래프 빌더의 포인트 또는 부드러운 범례를 제거하는 방법은 무엇입니까?안녕하세요,
기본적으로 그래프 빌더에 포인트와 스무딩 라인이 있으면 둘 다에 대한 범례가 있습니다. 때로는 두 개의 전설을 갖는 것이 불필요하며 하나를 없애고 싶습니다. 이 구문은 무엇입니까?
그래프 빌더 기능을 만들었습니다 (아래 참조). 하지만 전설 (0)을 점수에 넣어도 전설을 삭제할 수 없습니다.
//Variable //Definition
//listin ==> list object which contains the following arguments:
//1. Ncol for Line Up Box output
//2. Frame size length
//3. Frame size height
//4. X axis column
// 5+. Y axis columns
// grp ==> grouping variable for X
//ovl ==> grouping variable for overlay (fitting)
// plotout ==> line up box object output
dgbplot = Function({listin,grp,ovl},{plotout},
plotout=Lineup Box(N Col(listin[1]),);
For (i=5, i<=Nitems(listin), i++,
gb = Graph Builder(
Size( Eval(listin[2]), Eval(listin[3]) ),
Show Control Panel( 0 ),
Variables(
X( Column(Eval(listin[4]))),
Y( Column(Eval(listin[i]))),
Group X(Column(grp)),
Overlay(Column(ovl))
),
Elements( Points( X, Y ), Smoother( X, Y, Legend(0), Lambda(5))),
);
gbr = gb << report;
);
plotout;
);다른 한편으로, 나는 "시험"스크립트를 만들려고 노력하고 그것이 내가 원하는 것을 해낸다. 나는 이유를 이해할 수 없다.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Graph Builder(
Size( 960, 300 ),
Show Control Panel( 0 ),
Variables(
X( :weight ),
Y( :height ),
Group X( :sex ),
Overlay( :sex )
),
Elements(
Points( X, Y, ),
Smoother( X, Y, Lambda( 5 ) )
)
)
감사,
샤이라
제목 : Re : JSL을 사용하여 그래프 빌더의 포인트 또는 부드러운 범례를 제거하는 방법?나는 당신의 기능이 그것이 돌아오고있는 것에 문제가 있다고 생각합니다. "plotout"요소는 다음과 같이 함수로 정의됩니다.
plotout=Lineup Box(N Col(listin[1]),);
완성 된 개체이며 비어있는 라인업 상자가 있습니다. 이 함수의 다른 함수는 아무 것도 추가하지 않습니다. 그러나 함수에서 반환해야하는 요소는 사용자가 지정하는 요소입니다. 아래 스크립트는 원하는 플롯을 생성합니다. 라인 빌더 ()의 내부에 그래프 빌더 코드를 통합 한 간단한 함수 변경에 유의하십시오.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dgbplot = Function( {listin, grp, ovl},
{plotout},
plotout = Lineup Box( N Col( listin[1] ),
For( i = 5, i <= N Items( listin ), i++,
gb = Graph Builder(
Size( Eval( listin[2] ), Eval( listin[3] ) ),
Show Control Panel( 0 ),
Variables(
X( Column( Eval( listin[4] ) ) ),
Y( Column( Eval( listin[i] ) ) ),
Group X( Column( grp ) ),
Overlay( Column( ovl ) )
),
Elements( Points( X, Y ), Smoother( X, Y, Legend( 0 ), Lambda( 5 ) ) )
// uncomment the lines below to remove smoother legend and keep points
/*,SendToReport(
Dispatch(
{},
"400",
LegendBox,
{Legend Position( {2, [0, 1], 1, [-1, -1]} ), Position( {0, 1, -1, -1} )}
)
)*/
);
gbr = gb << report;
)
);
plotout;
);
listin = {1, 960, 300, "weight", "height"};
nw = New Window( "test", vlb = V List Box() );
myplot = dgbplot( listin, "sex", "sex" );
vlb << append( myplot );