Hier ist eine Aktualisierung des Skripts, das ich zuvor gesendet habe.Es passt besser zu Ihrer vorgeschlagenen Ausgabe.Es ermöglicht Ihnen auch, mehrere Auswahlsätze auszuführen, ohne dass die Ausgänge aufeinander stampfen.Es gibt auch keine Obergrenze (außer dem Speicherplatz auf Ihrem Computer) für die Anzahl der Samples, die Sie ausführen möchten.
Sie können dieses Skript entweder nehmen und es in die Datentabelle der ersten Antwort einbetten, die ich gegeben habe, oder Sie können es als separates eigenständiges Skript ausführen.Wählen Sie in beiden Fällen einfach die Zeilen (Beispiele) aus, die Sie in die Ausgabe aufnehmen möchten, und führen Sie dann das Skript aus.
Names Default To Here( 1 );<BR />dt = Current Data Table();<BR /><BR />// Get the selected rows from the primary data table<BR />dttemp = dt << subset( selected columns( 0 ), selected rows( 1 ), invisible );<BR /><BR />// Create a random value to be used for this running of the script.<BR />// This is to make the values in this run unique to this run, incase<BR />// multiple runs are made against the data table, without closing the output<BR />TheRandom = Char( Random Integer( 1, 100000000 ) );<BR /><BR />// Wrap the code in a Substitution function, to add the TheRandom to the steps<BR />// that need to be kept unique. __xxx__ indicates the areas where substitution<BR />// has to be made<BR />Eval(<BR /> Substitute(<BR /> Expr(<BR /> // Make a list of the data tables this execution of the code<BR /> // will make, so they can be closed when the output window is<BR /> // closed<BR /> __DataTableList__ = {};<BR /> // Create the initial window<BR /> __nw__ = New Window( "Product Sample", TheVLB = V List Box() );<BR /> // This is the code that will be run when the above window is closed<BR /> __nw__ << on close(<BR /> For( i = 1, i <= N Items( __DataTableList__ ), i++,<BR /> Try( Close( Data Table( __DataTableList__[i]), nosave ) )<BR /> )<BR /> );<BR /> // Loop across all of the rows in the data table created from the<BR /> // selected rows in the original data table<BR /> For( loop = 1, loop <= N Rows( dttemp ), loop++,<BR /> // Create a new data table for each row<BR /> dttemp << clear select;<BR /> dttemp << select rows( loop );<BR /> dttemp1 = dttemp << subset(<BR /> selected rows( 1 ),<BR /> selected columns( 0 ),<BR /> invisible<BR /> );<BR /> // Stack the one row table to make transform it to the structure<BR /> // that Graph Builder can best use it<BR /> dtstacked = dttemp1 << Stack(<BR /> invisible,<BR /> columns(<BR /> :NAP,<BR /> :Name( " C1 NAP" ),<BR /> :C2 NAP,<BR /> :C3 NAP,<BR /> :C4 NAP,<BR /> :FLU,<BR /> :C1 FLU,<BR /> :C2 FLU,<BR /> :C3 FLU,<BR /> :Name( "PHE/ANT" ),<BR /> :Name( "C1 PHE/ANT" ),<BR /> :Name( "C2 PHE/ANT" ),<BR /> :Name( "C3 PHE/ANT" ),<BR /> :Name( "C4 PHE/ANT" ),<BR /> :DBT,<BR /> :C1 DBT,<BR /> :C2 DBT,<BR /> :C3 DBT,<BR /> :C4 DBT,<BR /> :Name( "FLRN/PYR" ),<BR /> :Name( "C1 FLRN/PYR" ),<BR /> :Name( "C2 FLRN/PYR" ),<BR /> :Name( "C3 FLRN/PYR" ),<BR /> :Name( "C4 FLRN/PYR" ),<BR /> :Name( "BaA/CHR" ),<BR /> :Name( "C1 BaA/CHR" ),<BR /> :Name( "C2 BaA/CHR" ),<BR /> :Name( "C3 BaA/CHR" ),<BR /> :Name( "C4 BaA/CHR" )<BR /> ),<BR /> Source Label Column( "Chemical Compound" ),<BR /> Stacked Data Column( "Data" )<BR /> );<BR /> // Close the no longer needed single row data table<BR /> Close( dttemp1, nosave );<BR /> // Set Row Order Level for the Chemical Compound column, which<BR /> // will order the axis on the graph in the order the data are <BR /> // found in the data table<BR /> dtstacked:Chemical Compound << set property( "Row Order Levels", 1 );<BR /> // Insert this table in the DataTableList, because it will remain<BR /> // open until the output window is closed<BR /> Insert Into( __DataTableList__, dtstacked << get name );<BR /> // Append to the output window the Graph Builder for this data table<BR /> TheVLB << append(<BR /> gb = dtstacked << Graph Builder(<BR /> Size( 542, 428 ),<BR /> Show Control Panel( 0 ),<BR /> Variables( X( :Chemical Compound ), Y( :Data ), Page( :Sample ) ),<BR /> Elements( Bar( X, Y, Legend( 6 ) ) ),<BR /> SendToReport(<BR /> Dispatch(<BR /> {},<BR /> "Chemical Compound",<BR /> ScaleBox( 2 ),<BR /> {Label Row( Label Orientation( "Angled" ) )}<BR /> ),<BR /> Dispatch(<BR /> {},<BR /> "Data",<BR /> ScaleBox( 2 ),<BR /> {Min( 0 ), Inc( 0.02 ), Minor Ticks( 0 )}<BR /> ),<BR /> Dispatch(<BR /> {},<BR /> "400",<BR /> ScaleBox,<BR /> {Legend Model( 6, Properties( 0, {Fill Color( 45 )} ) )}<BR /> ),<BR /> Dispatch(<BR /> {},<BR /> "graph title",<BR /> TextEditBox,<BR /> {Set Text( "Product Sample" )}<BR /> ),<BR /> Dispatch( {}, "X title", TextEditBox, {Set Text( "" )} ),<BR /> Dispatch( {}, "Y title", TextEditBox, {Set Text( "" )} ),<BR /> Dispatch( {}, "400", LegendBox, {Set Title( "" )} )<BR /> )<BR /> )<BR /> );<BR /><BR /> // Add reference lines every 2% <BR /> For( i = .02, i <= Report( gb )[AxisBox( 2 )] << get max, i = i + .02,<BR /> Report( gb )[AxisBox( 2 )] << Add Ref Line( i, "Solid", "Black", "", 1 );<BR /> );<BR /> // Adding reference lines changes the increment(JMP bug I think)<BR /> // so change the increment back to 2%<BR /> Report( gb )[AxisBox( 2 )] << inc( .02 );<BR /> );<BR /> ),<BR /> // These are the items to substitute<BR /> Expr( __nw__ ), Parse( "nw" || TheRandom ),<BR /> Expr( __DataTableList__ ), Parse( "DataTableList" || TheRandom )<BR /> )<BR />);<BR />// Close dttemp data table since it is no longer needed<BR />Close( dttemp, nosave );<BR /><BR />Hier ist ein Skript, das eine Datentabelle mit einem eingebetteten Skript erstellt.Wählen Sie einfach die Zeilen (Beispiele) aus, die Sie grafisch darstellen möchten, und klicken Sie dann auf das eingebettete Skript und führen Sie es aus.
New Table( "Sample Data Table",
Add Rows( 10 ),
New Script(
"Graph Selected Samples",
Names Default To Here( 1 );
dt = Current Data Table();
dttemp = dt << subset(
selected columns( 0 ),
selected rows( 1 ),
invisible
);
dtstacked = dttemp << Stack(
invisible,
columns(
:NAP,
:Name( " C1 NAP" ),
:C2 NAP,
:C3 NAP,
:C4 NAP,
:FLU,
:C1 FLU,
:C2 FLU,
:C3 FLU,
:Name( "PHE/ANT" ),
:Name( "C1 PHE/ANT" ),
:Name( "C2 PHE/ANT" ),
:Name( "C3 PHE/ANT" ),
:Name( "C4 PHE/ANT" ),
:DBT,
:C1 DBT,
:C2 DBT,
:C3 DBT,
:C4 DBT,
:Name( "FLRN/PYR" ),
:Name( "C1 FLRN/PYR" ),
:Name( "C2 FLRN/PYR" ),
:Name( "C3 FLRN/PYR" ),
:Name( "C4 FLRN/PYR" ),
:Name( "BaA/CHR" ),
:Name( "C1 BaA/CHR" ),
:Name( "C2 BaA/CHR" ),
:Name( "C3 BaA/CHR" ),
:Name( "C4 BaA/CHR" )
),
Source Label Column( "Chemical Compound" ),
Stacked Data Column( "Data" )
);
Close( dttemp, nosave );
dtstacked:Chemical Compound << set property( "Row Order Levels", 1 );
gb = dtstacked << Graph Builder(
Size( 534, 1464 ),
Show Control Panel( 0 ),
Variables( X( :Chemical Compound ), Y( :Data ), Page( :Sample ) ),
Elements( Bar( X, Y, Legend( 6 ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model( 6, Properties( 0, {Fill Color( 45 )} ) )}
),
Dispatch( {}, "400", LegendBox, {Set Title( "" )} )
)
);
gb << on close( Close( dtstacked, nosave ) );
),
New Column( "Sample",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] )
),
New Column( "NAP",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[0.002, 0.0302537593550514, 0.0466926784946118, 0.0448445924471598,
0.0478487853344995, 0.0154921119890641, 0.0365249534228351,
0.00493989895819686, 0.0235698992158286, 0.0381656375704333]
)
),
New Column( " C1 NAP",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[0.019, 0.00774147778982297, 0.029915005012881, 0.0468929482218809,
0.0092733804017771, 0.036089365969412, 0.00376344798482023,
0.00380945356236771, 0.00193938017473556, 0.0489603107678704]
)
),
New Column( "C2 NAP",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[0.08, 0.0270089123100042, 0.0226710953088477, 0.0259517372348346,
0.0184357883431949, 0.0128242306013126, 0.00318159612896852,
0.0317445193028543, 0.0380520822689868, 0.0067287613407243]
)
),
New Column( "C3 NAP",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[0.115, 0.0283634321223944, 0.0348076855710242, 0.0318920150578488,
0.0173453791385982, 0.0222847076184116, 0.0346989600521047,
0.0143180883196183, 0.0327768972115591, 0.0222957084132358]
)
),
New Column( "C4 NAP",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[0.09, 0.00166843675868586, 0.0287732524415478, 0.0219370269028004,
0.0127755957059562, 0.0223023804044351, 0.0351790483894292,
0.0249330674058292, 0.020071810176596, 0.0424596724130679]
)
),
New Column( "FLU",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[0.003, 0.0138887988573406, 0.038354084254941, 0.0252995605911128,
0.0154636751729995, 0.0433928036768921, 0.0134715204646345,
0.0445313894778956, 0.0290542597356252, 0.0141719027855434]
)
),
New Column( "C1 FLU",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[0.018, 0.0293069139991421, 0.0256769686636981, 0.00826683883252553,
0.0171085286648013, 0.0204629610797856, 0.00341956458706409,
0.0313640460087918, 0.0480407851564232, 0.0340318603476044]
)
),
New Column( "C2 FLU",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[0.038, 0.0330850324584171, 0.0437534969407134, 0.0109815957569517,
0.00449292429722846, 0.0132446803962812, 0.0386687645141501,
0.0415801736263093, 0.034111307727173, 0.00602988170552999]
)
),
New Column( "C3 FLU",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[0.082, 0.0477887129648589, 0.0355156372459605, 0.041393784352811,
0.015643085104879, 0.00226023636339232, 0.0251587821198627,
0.0304925097427331, 0.0429695688353386, 0.0474338214022573]
)
),
New Column( "PHE/ANT",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[0.01, 0.0427148100999184, 0.0202775471704081, 0.0149288747075479,
0.00559148345608264, 0.0421801740452647, 0.0240726777378004,
0.0209547791823279, 0.0244350242365617, 0.0497362994323485]
)
),
New Column( "C1 PHE/ANT",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[0.039, 0.00280673243640922, 0.0199594784926157, 0.0329235823897179,
0.01066317764204, 0.0144819677001797, 0.00979254531022161,
0.0220209252389614, 0.038684288996039, 0.0127347022991162]
)
),
New Column( "C2 PHE/ANT",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[0.06, 0.0486931873387657, 0.0215076145802159, 0.0244833285761997,
0.0286523971226998, 0.0172093356093392, 0.0289594860547222,
0.0275001738960855, 0.0266731308130547, 0.0466893218264449]
)
),
New Column( "C3 PHE/ANT",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[0.069, 0.0446601634738035, 0.0138321250828449, 0.0425168035281822,
0.0366099622820038, 0.0274317172830924, 0.0353664513374679,
0.00111495549138635, 0.0135933586545289, 0.00108291531680152]
)
),
New Column( "C4 PHE/ANT",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[0.031, 0.0144599841590971, 0.009610575562343, 0.0302202351707965,
0.0212843791709747, 0.0115216388173867, 0.0468299421959091,
0.00549429435911588, 0.0363094289952423, 0.0336387161160819]
)
),
New Column( "DBT",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[0.003, 0.0333379577584565, 0.00272550118085928, 0.0372126542304177,
0.00271068549877964, 0.0312318569093477, 0.00354533990845084,
0.0220444895469118, 0.021050514069153, 0.0383053797436878]
)
),
New Column( "C1 DBT",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[0.033, 0.0116053564054891, 0.0124466585058253, 0.0438335321764462,
0.00124102681153454, 0.044037665597396, 0.0495759285241365,
0.0475604402602185, 0.0456430103564635, 0.0310628124901559]
)
),
New Column( "C2 DBT",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[0.087, 0.0159295270822477, 0.0102833600859158, 0.0239058316384908,
0.0178571299198084, 0.0348719786126167, 0.00821598792239092,
0.00843277889839373, 0.0452348746119533, 0.01068949145847]
)
),
New Column( "C3 DBT",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[., 0.00672533513652161, 0.013112988761859, 0.0330644477382302,
0.0482545678631868, 0.0133067361686844, 0.0265975029869005,
0.0381060357526876, 0.0430836911720689, 0.049541658553062]
)
),
New Column( "C4 DBT",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[0.034, 0.0058728216253221, 0.0217233841579873, 0.0402756876784842,
0.0313993025359232, 0.029122445494635, 0.0155939766000956,
0.0420744900063146, 0.0285329493524041, 0.0489617482072208]
)
),
New Column( "FLRN/PYR",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[0.001, 0.0345496558696032, 0.0321322070148308, 0.0267007229174487,
0.0259779584354255, 0.0283408940385561, 0.0373562634971458,
0.0393744796728715, 0.0145546169539448, 0.0282392732428852]
)
),
New Column( "C1 FLRN/PYR",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[0.01, 0.0409959553205408, 0.0325308263734914, 0.049760709581431,
0.0423577155969106, 0.0143415241884068, 0.0192488916243892,
0.0224930502227508, 0.0348894201670773, 0.0425700373509899]
)
),
New Column( "C2 FLRN/PYR",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[0.019, 0.00380003489204682, 0.0340351563671138, 0.0209355363992509,
0.0493748148838058, 0.0330725406832062, 0.0281902657279279,
0.015132855331758, 0.00606476198509335, 0.026483667955501]
)
),
New Column( "C3 FLRN/PYR",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[0.041, 0.0477709266166203, 0.0290582531234249, 0.0284437057543546,
0.0460180501651484, 0.0212978765433654, 0.00925033876067028,
0.0150167961854022, 0.00671246657753363, 0.0208397668299731]
)
),
New Column( "C4 FLRN/PYR",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[0.03, 0.0333795196467545, 0.0334625377673656, 0.0027455012050923,
0.0280089165221434, 0.0129167727059685, 0.0241117861049715,
0.00186966460011899, 0.0295675685461611, 0.0391173240377102]
)
),
New Column( "BaA/CHR",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[0.005, 0.0472474740443286, 0.0311875404128805, 0.0246964252435137,
0.0193766511015128, 0.0417157581949141, 0.037641080430476,
0.0216226827097125, 0.0370904210142326, 0.00173414511815645]
)
),
New Column( "C1 BaA/CHR",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[0.008, 0.0445609674151055, 0.00482703192089684, 0.00970582901337184,
0.0416694305497222, 0.00920417479611933, 0.0252414871286601,
0.0213213407513686, 0.0301611067913473, 0.0423710284563713]
)
),
New Column( "C2 BaA/CHR",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[0.026, 0.0127562464796938, 0.00709548401203938, 0.0126328233701643,
0.0460777241429314, 0.0249449488269165, 0.0261664025301579,
0.0219898488600738, 0.0486704192098696, 0.0349820018485188]
)
),
New Column( "C3 BaA/CHR",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[0.01, 0.0036289812636096, 0.0457750377375633, 0.00400210773036815,
0.0182483235485852, 0.00714060053229332, 0.0418625881380867,
0.00615676692244597, 0.0475078795051668, 0.026821686824318]
)
),
New Column( "C4 BaA/CHR",
Numeric,
"Continuous",
Format( "Percent", 7, 2 ),
Set Values(
[0.004, 0.0381506804318633, 0.0201645611631684, 0.0330415739305317,
0.0110197423135396, 0.0322338481522165, 0.0153273207338061,
0.0281656794969458, 0.0119208308472298, 0.0111531151456293]
)
)
)
Hier ist eine Beispielausgabe des Skripts

Dieses einfache Skript verarbeitet bis zu 100 Samples.Diese Einschränkung kann leicht überwunden werden.Zusätzlich können die Rasterlinien, die Sie in Ihrer Probe hatten, hinzugefügt werden.Dafür müsste das Skript nur etwas schlauer werden.
Aber Sie haben nur nach der Möglichkeit gesucht, dass JMP tun kann, was Sie wollen, und ich denke, das zeigt Ihnen deutlich, dass es das kann.