일반 분위수 그림의 선 색상을 행 범례에 설정된 행 색상과 일치시킵니다.Oneway 도표에서는 행 범례의 색상 테마 "SAS Statistical"로 마커의 색상을 지정했지만 일반 분위수 도표의 마커를 연결하는 선은 여전히 "JMP 기본" 색상을 사용합니다.

"범례 설정"으로 이동하여 색상 테마를 "SAS Statistical"로 변경하여 선 색상을 "SAS Statistical"로 수동으로 변경할 수 있습니다.그러나 이 방법은 실제로 아래에 강조 표시된 대로 JSL의 색상을 하드 코딩하므로 일반적인 솔루션으로 사용할 수 없습니다.예를 들어, 4개의 그룹(1C, 2E, 3E, 4E)이 있는 다른 데이터세트에서는 4E의 선 색상이 정의되지 않습니다.JSL을 사용하여 내가 가지고 있는 그룹 수에 관계없이 행 범례에서 설정한 행 색상과 선 색상을 일치시키는 일반적인 방법이 있습니까?감사해요.

Oneway(
Y( :Data ),
X( :Group ),
Plot Actual by Quantile( 1 ),
Line of Fit( 0 ),
Box Plots( 1 ),
X Axis Proportional( 0 ),
Points Jittered( 1 ),
Grand Mean( 0 ),
SendToReport(
Dispatch(
{},
"222",
ScaleBox,
<FONT color="#FF0000">{Legend Model(
1,
Properties(
0,
{Line Color( -7306931 ), Fill Color( -7306931 )},
Item ID( "1C", 1 )
),
Properties(
1,
{Line Color( -13654875 ), Fill Color( -13654875 )},
Item ID( "2E", 1 )
),
Properties(
2,
{Line Color( -6727072 ), Fill Color( -6727072 )},
Item ID( "3E", 1 )
)
)}</FONT>
),
Dispatch(
{},
"Oneway Plot",
FrameBox,
{DispatchSeg( Box Plot Seg( 1 ), Line Color( "Red" ) ),
DispatchSeg( Box Plot Seg( 2 ), Line Color( "Red" ) ),
DispatchSeg( Box Plot Seg( 3 ), Line Color( "Red" ) ),
Row Legend(
Group,
Color( 1 ),
Color Theme( "SAS Statistical" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
);Re: 일반 분위수 그림의 선 색상을 행 범례에 설정된 행 색상과 일치시킵니다.업데이트된 JSL 함수를 게시하는 것을 잊었습니다.
SetNQPLineColor = function({ow,theme},
{Default Local},<BR />
// Get the colors defined by the Color Theme
c = Get Color Theme Detail( eval(theme) );
// Get the # of line segs
ow_frmbx = ow << xpath("//FrameBox[@helpKey=\!"Oneway QuantilePlot\!"]");
Nseg = ow_frmbx << segCount("Line Seg");
Nseg=Nseg[1];
// Loop across the segments setting the lines to the required colors
For( i = 1, i <= min( Nseg , 2 * N Items(Eval List(c[3])) ), i+= 2,
seg = ow_frmbx << Find Seg( Line Seg( i ) );
seg << Line Color( c[3][Ceiling( i / 2 )] );
);
"Done";
);Re: 일반 분위수 그림의 선 색상을 행 범례에 설정된 행 색상과 일치시킵니다.@txnelson 제안해 주셔서 감사합니다.문제가 해결되었을 수도 있다고 생각합니다.처음 12개 그룹의 색상만 설정하고 나머지는 그대로 두면 JMP에는 이 12개 그룹을 기준으로 색상을 생성하는 알고리즘이 있는 것 같고, 생성된 색상은 "color by Column"의 행 색상과 일치하는 것 같습니다. :

Re: 일반 분위수 그림의 선 색상을 행 범례에 설정된 행 색상과 일치시킵니다.나는 모른다.나는 문서를 보거나 몇 가지 테스트를 실행하고 그것이 무엇을 하는지 알아낼 것입니다.또 다른 옵션은 색상 설정에 대한 모든 제어권을 사용자에게 넘겨받아 자신만의 색상을 만드는 것입니다.
Re: 일반 분위수 그림의 선 색상을 행 범례에 설정된 행 색상과 일치시킵니다.@txnelson 후속 질문: 그룹이 12개보다 많으면 다음 오류가 발생하고 line#13이 흰색으로 변합니다.
Ceiling(i / 2) = 13;
Subscript Range in access or evaluation of 'c[3][Ceiling(i / 2)]' , c[3][/*###*/Ceiling( i / 2 )]

"SAS Statistical"에는 12가지 색상만 정의된 것 같습니다.
N Items(Eval List(Get Color Theme Detail("SAS Statistical")[3])) = 12;그렇다면 색상 테마에 정의된 색상 수보다 많은 그룹이 있는 경우 JMP는 이를 어떻게 처리합니까?예를 들어 위의 그림에서 그룹 13은 다른 12개 그룹과 다른 마커 색상을 갖습니다.JMP는 이 색상을 어떻게 결정합니까?감사해요.
Re: 일반 분위수 그림의 선 색상을 행 범례에 설정된 행 색상과 일치시킵니다.그룹 수를 찾기 위해 dt로 돌아갈 필요가 없도록 스크립트를 약간 수정하고, 더 쉽게 사용할 수 있도록 함수로 만들었습니다.
SetNQPLineColor = function({ow,theme},
{Default Local},
// Get the colors defined by the Color Theme
c = Get Color Theme Detail( eval(theme) );
// Get the # of line segs
ow_frmbx = ow << xpath("//FrameBox[@helpKey=\!"Oneway QuantilePlot\!"]");
Nseg = ow_frmbx << segCount("Line Seg");
Nseg=Nseg[1];
// Loop across the segments setting the lines to the required colors
For( i = 1, i <= Nseg, i+= 2,
seg = ow_frmbx << Find Seg( Line Seg( i ) );
seg << Line Color( c[3][Ceiling( i / 2 )] );
);
"Done!";
);
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
// Set the row state colors
dt << color by column( :age , color theme("SAS Statistical"));
// Create the chart
ow1 = Oneway(
Y( :height ),
X( :age ),
Plot Actual by Quantile( 1 ),
Box Plots( 1 )
);
SetNQPLineColor(ow1,"SAS Statistical");
Re: 일반 분위수 그림의 선 색상을 행 범례에 설정된 행 색상과 일치시킵니다.@txnelson 감사합니다!이것은 아름답게 작동합니다.
Re: 일반 분위수 그림의 선 색상을 행 범례에 설정된 행 색상과 일치시킵니다.드디어 당신이 언급한 실제 문제를 알아낸 것 같습니다.... 머리가 둔한 것을 용서해 주세요......
다음은 색상 테마를 사용하여 포인트 색상을 선 색상과 일치시키는 방법입니다....이 경우 SAS 통계 색상 테마입니다.

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
// Set the row state colors
dt << color by column( :age , color theme("SAS Statistical"));
// Find out how many groupings there are
summarize( dt, grpBy = By( :age ) );
// Create the chart
ow = Oneway(
Y( :height ),
X( :age ),
Plot Actual by Quantile( 1 ),
Box Plots( 1 )
);
// Get the colors defined by the Color Theme
c = Get Color Theme Detail( "SAS Statistical" );
// Loop across the segments setting the lines to the required colors
For( i = 1, i <= N Items( grpBy ) * 2, i = i + 2,
seg = (Report( ow )[FrameBox( 2 )] << Find Seg( Line Seg( i ) ));
seg << line color( c[3][Ceiling( i / 2 )] );
);Re: 일반 분위수 그림의 선 색상을 행 범례에 설정된 행 색상과 일치시킵니다.@txnelson 당신의 답변에 감사드립니다.단, "JMP Default" 이외의 색상 테마에서는 작동하지 않습니다.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
dt << color by column( :sex , <FONT color="#ff0000"><STRONG>color theme("SAS Statistical")</STRONG></FONT>);
Oneway(
Y( :height ),
X( :sex ),
Plot Actual by Quantile( 1 ),
Box Plots( 1 ),
SendToReport(
Dispatch(
{},
"Oneway Plot",
FrameBox,
{DispatchSeg( Box Plot Seg( 1 ), Line Color( "Red" ) ), DispatchSeg(
Box Plot Seg( 2 ),
Line Color( "Red" )
)}
)
)
);
Re: 일반 분위수 그림의 선 색상을 행 범례에 설정된 행 색상과 일치시킵니다.행의 행 상태 색상을 설정한 다음 Oneway를 실행하면 원하는 것을 얻을 수 있다고 생각합니다.

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
dt << color by column( :sex );
Oneway(
Y( :height ),
X( :sex ),
Plot Actual by Quantile( 1 ),
Box Plots( 1 ),
SendToReport(
Dispatch(
{},
"Oneway Plot",
FrameBox,
{DispatchSeg( Box Plot Seg( 1 ), Line Color( "Red" ) ), DispatchSeg(
Box Plot Seg( 2 ),
Line Color( "Red" )
)}
)
)
);