Hi,
Working on automating analysis and need to make the automated generated script more generic.
The work flow is to create a summary table grouped by three columns with four columns getting derived values. That is fine.
Now I want to create oneway plots with one of the original grouping variables and also further group the plots by a second variable.
Grouping: Cycle, Step, Unique Step
4 separate Oneway by Cycle grouped Step.
The automatically generated script works on my test file fine. The issue is how to make it more generic.
If I look at the script there are specific call outs for the step column value
<<{Arrange in Rows(4)}, Where(:Step == 1), Where(:Step == 1))
And in the test case there are 19 values for step. How should I go about crafting this to be flexible to the number of steps? Various files will have different numbers of steps. What are best practices here? My desired out come is to have the four plots in a row with the grouping box also having the value of the step shown (now it is in small text after the plots) and robots to the number of steps that an incoming file might have.
Andy
dt1=Data Table( dt) <<Summary(
Group( :Unique Step, :Step, :Cycle ),
Min( :"TV Pres (torr)"n ),
Min( :"DS Pres (torr)"n ),
Max( :"TV Pres (torr)"n ),
Max( :"DS Pres (torr)"n ),
Freq( "None" ),
Weight( "None" )
);
New Window("Pressure Graphs", V List Box(
Fit Group(
Oneway(Y(:"Min(TV Pres (torr))"n), X(:Cycle), Quantiles(1), Means(1), Mean Diamonds(0), Box Plots(1), X Axis Proportional(0), Points Jittered(1), Grand Mean(0), SendToReport(Dispatch({}, "Oneway Plot", FrameBox, {DispatchSeg(BoxPlotSeg(1), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(2), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(3), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(4), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(5), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(6), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(7), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(8), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(9), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(10), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(11), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(12), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(13), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(14), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(15), {Confidence Diamond(0), Line Color("Red")})}), Dispatch({}, "Quantiles", OutlineBox, {Close(1)}), Dispatch({}, "Oneway Anova", OutlineBox, {Close(1)}), Dispatch({"Oneway Anova"}, "Analysis of Variance", OutlineBox, {Close(1)}))),
Oneway(Y(:"Min(DS Pres (torr))"n), X(:Cycle), Quantiles(1), Means(1), Mean Diamonds(0), Box Plots(1), X Axis Proportional(0), Points Jittered(1), Grand Mean(0), SendToReport(Dispatch({}, "Oneway Plot", FrameBox, {DispatchSeg(BoxPlotSeg(1), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(2), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(3), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(4), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(5), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(6), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(7), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(8), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(9), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(10), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(11), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(12), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(13), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(14), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(15), {Confidence Diamond(0), Line Color("Red")})}), Dispatch({}, "Quantiles", OutlineBox, {Close(1)}), Dispatch({}, "Oneway Anova", OutlineBox, {Close(1)}), Dispatch({"Oneway Anova"}, "Analysis of Variance", OutlineBox, {Close(1)}))),
Oneway(Y(:"Max(TV Pres (torr))"n), X(:Cycle), Quantiles(1), Means(1), Mean Diamonds(0), Box Plots(1), X Axis Proportional(0), Points Jittered(1), Grand Mean(0), SendToReport(Dispatch({}, "Oneway Plot", FrameBox, {DispatchSeg(BoxPlotSeg(1), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(2), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(3), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(4), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(5), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(6), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(7), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(8), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(9), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(10), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(11), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(12), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(13), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(14), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(15), {Confidence Diamond(0), Line Color("Red")})}), Dispatch({}, "Quantiles", OutlineBox, {Close(1)}), Dispatch({}, "Oneway Anova", OutlineBox, {Close(1)}), Dispatch({"Oneway Anova"}, "Analysis of Variance", OutlineBox, {Close(1)}))),
Oneway(Y(:"Max(DS Pres (torr))"n), X(:Cycle), Quantiles(1), Means(1), Mean Diamonds(0), Box Plots(1), X Axis Proportional(0), Points Jittered(1), Grand Mean(0), SendToReport(Dispatch({}, "Oneway Plot", FrameBox, {DispatchSeg(BoxPlotSeg(1), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(2), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(3), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(4), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(5), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(6), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(7), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(8), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(9), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(10), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(11), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(12), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(13), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(14), {Confidence Diamond(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(15), {Confidence Diamond(0), Line Color("Red")})}), Dispatch({}, "Quantiles", OutlineBox, {Close(1)}), Dispatch({}, "Oneway Anova", OutlineBox, {Close(1)}), Dispatch({"Oneway Anova"}, "Analysis of Variance", OutlineBox, {Close(1)}))),
<<{Arrange in Rows(4)}, Where(:Step == 1), Where(:Step == 1)),
Fit Group(
Oneway(Y(:"Min(TV Pres (torr))"n), X(:Cycle), Quantiles(1), Means(1), Mean Diamonds(0), Box Plots(1), X Axis Proportional(0), Points Jittered(1), Grand Mean(0), SendToReport(Dispatch({}, "Oneway Plot", FrameBox, {DispatchSeg(BoxPlotSeg(1), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(2), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(3), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(4), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(5), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(6), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(7), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(8), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(9), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(10), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(11), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(12), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(13), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(14), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(15), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")})}), Dispatch({}, "Quantiles", OutlineBox, {Close(1)}), Dispatch({}, "Oneway Anova", OutlineBox, {Close(1)}), Dispatch({"Oneway Anova"}, "Analysis of Variance", OutlineBox, {Close(1)}))),
Oneway(Y(:"Min(DS Pres (torr))"n), X(:Cycle), Quantiles(1), Means(1), Mean Diamonds(0), Box Plots(1), X Axis Proportional(0), Points Jittered(1), Grand Mean(0), SendToReport(Dispatch({}, "Oneway Plot", FrameBox, {DispatchSeg(BoxPlotSeg(1), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(2), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(3), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(4), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(5), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(6), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(7), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(8), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(9), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(10), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(11), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(12), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(13), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(14), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(15), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")})}), Dispatch({}, "Quantiles", OutlineBox, {Close(1)}), Dispatch({}, "Oneway Anova", OutlineBox, {Close(1)}), Dispatch({"Oneway Anova"}, "Analysis of Variance", OutlineBox, {Close(1)}))),
Oneway(Y(:"Max(TV Pres (torr))"n), X(:Cycle), Quantiles(1), Means(1), Mean Diamonds(0), Box Plots(1), X Axis Proportional(0), Points Jittered(1), Grand Mean(0), SendToReport(Dispatch({}, "Oneway Plot", FrameBox, {DispatchSeg(BoxPlotSeg(1), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(2), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(3), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(4), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(5), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(6), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(7), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(8), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(9), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(10), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(11), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(12), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(13), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(14), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(15), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")})}), Dispatch({}, "Quantiles", OutlineBox, {Close(1)}), Dispatch({}, "Oneway Anova", OutlineBox, {Close(1)}), Dispatch({"Oneway Anova"}, "Analysis of Variance", OutlineBox, {Close(1)}))),
Oneway(Y(:"Max(DS Pres (torr))"n), X(:Cycle), Quantiles(1), Means(1), Mean Diamonds(0), Box Plots(1), X Axis Proportional(0), Points Jittered(1), Grand Mean(0), SendToReport(Dispatch({}, "Oneway Plot", FrameBox, {DispatchSeg(BoxPlotSeg(1), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(2), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(3), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(4), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(5), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(6), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(7), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(8), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(9), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(10), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(11), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(12), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(13), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(14), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")}), DispatchSeg(BoxPlotSeg(15), {Confidence Diamond(0), Shortest Half Bracket(0), Line Color("Red")})}), Dispatch({}, "Quantiles", OutlineBox, {Close(1)}), Dispatch({}, "Oneway Anova", OutlineBox, {Close(1)}), Dispatch({"Oneway Anova"}, "Analysis of Variance", OutlineBox, {Close(1)}))),
<<{Arrange in Rows(4)}, Where(:Step == 2), Where(:Step == 2)),