매번 새로 생성된 범례 열을 사용하여 각 var 차트에 대해 다른 범례가 있는 지정된 열 목록에 대해 여러 varchart 생성.// I want to create journal of varcharts for a list of columns in a dataset with different legends. a legend column is mentioned which would change in reality for each loop. everything works expect the new column formula does not work. <BR />//In this example, i have used a static legend value of "ABC" but this would change for every loop in reality. the issue is the new formula column does not evaluate the column name <BR /><BR />dt = current data table();
mycolumnList = {"species","subject","season"};
For( i = 1, i <= N Items(mycolumnList), i++,
Try(dt << delete column("LegendCol"));
legend = "ABC";
Try( dt << New Column( "LegendCol", Formula( If(Column(mycolumnList[i])[Row()] == legend, "first", "rest" ) ) ) );
myvarChart = vlb << append(
dt << Variability Chart(
Y( :miles ),
X( eval(mycolumnList[i]) ),
Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
Connect Cell Means( 1 ),
Variability Summary Report( 1 ),
Std Dev Chart( 0 ),
Points Jittered( 1 ),
Show Box Plots( 1 ),
Name( "Show Gauge R&R Specifications Dialog" )(0),
Automatic Recalc( 1 ),
SendToReport(
Dispatch(
{"Variability Chart for SORT@WAFER@T_GOOD"},
"Variability Chart",
FrameBox,
{Row Legend(
Name( "LegendCol" ),
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 1 ),
Marker Theme( "Solid" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
));
);안몰@1996
자동화 및 스크립팅기본 데이터 분석 및 모델링데이터 혼합 및 정리데이터 탐색 및 시각화Re: 매번 새로 생성된 범례 열을 사용하여 각 var 차트에 대해 서로 다른 범례가 있는 지정된 열 목록에 대해 여러 varchart를 생성합니다.스크립트를 약간 수정했습니다.나는 그것이 당신에게 완전한 해결책을 가져다 줄지 확신하지 못합니다.그러나 샘플 데이터에서 작동하는 것 같습니다.
Names Default To Here( 1 );
// I want to create journal of varcharts for a list of columns in a dataset
// with different legends. a legend column is mentioned which would change in
// reality for each loop. everything works expect the new column formula does not work.
//In this example, i have used a static legend value of "ABC" but this would change
// for every loop in reality. the issue is the new formula column does not evaluate
// the column name dt = current data table();
nw = New Window( "test", vlb = V List Box() );
dt = Current Data Table();
mycolumnList = {"species", "subject", "season"};
For( i = 1, i <= N Items( mycolumnList ), i++,
Try( dt << delete column( "LegendCol" ) );
legend = "ABC";
Eval(
Substitute(
Expr(
Try(
dt << New Column( "LegendCol", Formula( If( Char( As Column( _mycolumnList_ ) ) == _legend_, "first", "rest" ) ) )
)
),
Expr( _mycolumnList_ ), mycolumnlist[i],
Expr( _legend_ ), legend
)
);
myvarChart = vlb << append(
dt << Variability Chart(
Y( :miles ),
X( Eval( mycolumnList[i] ) ),
Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
Connect Cell Means( 1 ),
Variability Summary Report( 1 ),
Std Dev Chart( 0 ),
Points Jittered( 1 ),
Show Box Plots( 1 ),
Name( "Show Gauge R&R Specifications Dialog" )(0),
Automatic Recalc( 1 ),
SendToReport(
Dispatch(
{"Variability Gauge Analysis for miles", "Variability Chart for miles"},
"Variability Chart",
FrameBox,
{Row Legend(
LegendCol,
Color( 1 ),
Color Theme( "JMP Default"(1) ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
)
);
);Re: 매번 새로 생성된 범례 열을 사용하여 각 var 차트에 대해 다른 범례가 있는 지정된 열 목록에 대해 여러 varchart를 생성합니다.Jim에게 감사하지만 여전히 작은 문제가 하나 있습니다. 어쨌든 모든 플롯이 동일한 범례를 얻고 있습니다.
예를 들어, 이와 같은 것입니다. 범례는 루프에서 매번 변경됩니다. 그러나 범례는 var 차트에서 선택되지 않습니다. 나는 항상 모든 플롯에서 최종 범례 열 범례를 얻습니다.
nw = New Window( "test", vlb = V List Box() );
dt = Current Data Table();
mycolumnList = {"species", "subject", "season"};
mylegendList = Associative Array({"species","subject","season"},{"FOX","2","summer"});
For( i = 1, i <= N Items( mycolumnList ), i++,
Try( dt << delete column( "LegendCol" ) );
//legend = "ABC";
legend = mylegendList[mycolumnList[i]];
Eval(
Substitute(
Expr(
Try(
dt << New Column( "LegendCol", Formula( If( Char( As Column( _mycolumnList_ ) ) == _legend_, "first", "rest" ) ) )
)
),
Expr( _mycolumnList_ ), mycolumnlist[i],
Expr( _legend_ ), legend
)
);
myvarChart = vlb << append(
dt << Variability Chart(
Y( :miles ),
X( Eval( mycolumnList[i] ) ),
Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
Connect Cell Means( 1 ),
Variability Summary Report( 1 ),
Std Dev Chart( 0 ),
Points Jittered( 1 ),
Show Box Plots( 1 ),
Name( "Show Gauge R&R Specifications Dialog" )(0),
Automatic Recalc( 1 ),
SendToReport(
Dispatch(
{"Variability Gauge Analysis for miles", "Variability Chart for miles"},
"Variability Chart",
FrameBox,
{Row Legend(
LegendCol,
Color( 1 ),
Color Theme( "JMP Default"(1) ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
))));
Re: 매번 새로 생성된 범례 열을 사용하여 각 var 차트에 대해 다른 범례가 있는 지정된 열 목록에 대해 여러 varchart를 생성합니다.현재 하고 있는 작업을 수행하려면 각 차트에 대해 별도의 Legends 열을 만들어야 한다고 생각합니다.
Names Default To Here( 1 );
nw = New Window( "test", vlb = V List Box() );
dt = Current Data Table();
mycolumnList = {"species", "subject", "season"};
mylegendList = Associative Array( {"species", "subject", "season"}, {"FOX", "2", "summer"} );
For( i = 1, i <= N Items( mycolumnList ), i++,
Try( dt << delete column( "LegendCol" || Char( i ) ) );
//legend = "ABC";
legend = mylegendList[mycolumnList[i]];
Eval(
Substitute(
Expr(
Try(
dt << New Column( "LegendCol" || Char( i ),
Formula( If( Char( As Column( _mycolumnList_ ) ) == _legend_, "first", "rest" ) )
)
)
),
Expr( _mycolumnList_ ), mycolumnlist[i],
Expr( _legend_ ), legend
)
);
Eval(
Substitute(
Expr(
myvarChart = vlb << append(
dt << Variability Chart(
Y( :miles ),
X( Eval( mycolumnList[i] ) ),
Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
Connect Cell Means( 1 ),
Variability Summary Report( 1 ),
Std Dev Chart( 0 ),
Points Jittered( 1 ),
Show Box Plots( 1 ),
Name( "Show Gauge R&R Specifications Dialog" )(0),
Automatic Recalc( 1 ),
SendToReport(
Dispatch(
{"Variability Gauge Analysis for miles", "Variability Chart for miles"},
"Variability Chart",
FrameBox,
{Row Legend(
_LegendCol_,
Color( 1 ),
Color Theme( "JMP Default"(1) ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
)
)
),
Expr( _legendcol_ ), Parse( "LegendCol" || Char( i ) )
)
);
);