Here is an example that produces your Ethanol chart, with fictitious data
Here is a script that produces the plot
Names Default To Here( 1 );
// Create a sample data table
dt = New Table( "Example",
Add Rows( 4 ),
New Column( "Batch", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [1, 2, 3, 4] ) ),
New Column( "0hr Ethanol",
Numeric,
"Nominal",
Format( "", 16 ),
Set Values( [103.347990080313, 90.8056789034286, 110.847323879326, 94.4892596023655] )
),
New Column( "0 hr Lactic",
Numeric,
"Nominal",
Format( "", 16 ),
Set Selected,
Set Values( [98.2941757953967, 87.0280094785425, 96.8477348247328, 92.910237668013] )
),
New Column( "0 hr Acetic",
Numeric,
"Nominal",
Format( "", 16 ),
Set Values( [86.0736604847805, 84.7654940657705, 103.653020778599, 103.896496570196] )
),
New Column( "4hr Ethanol",
Numeric,
"Nominal",
Format( "", 16 ),
Set Values( [106.780752584519, 83.6557999642181, 131.739275066723, 108.595538300447] )
),
New Column( "4hr Lactic",
Numeric,
"Nominal",
Format( "", 16 ),
Set Values( [117.501711811893, 110.280136421701, 99.5008817613032, 124.122069840277] )
),
New Column( "4hr Acetic",
Numeric,
"Nominal",
Format( "", 16 ),
Set Values( [65.8570956816124, 98.7590715244122, 116.085302666605, 77.465274192855] )
),
New Column( "60 hr Ethanol",
Numeric,
"Nominal",
Format( "", 16 ),
Set Values( [93.2946183359449, 102.663246654816, 88.3140432209597, 77.0616091856786] )
),
New Column( "60 hr Lactic",
Numeric,
"Nominal",
Format( "", 16 ),
Set Values( [115.208356681673, 94.3976953097385, 117.870933434213, 88.9448640120466] )
),
New Column( "60 hr Acetic",
Numeric,
"Nominal",
Format( "", 16 ),
Set Values( [101.707143312459, 115.87798730461, 111.256786967136, 114.046044409696] )
),
Set Row States( [1, 0, 0, 0] )
);
// Stack the columns
dtStack = dt << Stack(
columns(
:"0hr Ethanol"n, :"0 hr Lactic"n, :"0 hr Acetic"n, :"4hr Ethanol"n, :"4hr Lactic"n, :"4hr Acetic"n, :"60 hr Ethanol"n, :"60 hr Lactic"n,
:"60 hr Acetic"n
),
Source Label Column( "Label" ),
Stacked Data Column( "Data" )
);
// Create new time and Type of Gas
dtStack << New Column( "Time", Format( "h:m" ), set each value( Num( Word( 1, :label, "h" ) ) * 3600 ) );
For each row(:label = word(-1,:Label," "));
// Split out into separate columns
dtSplit dtStack << Split(
Split By( :Label ),
Split( :Data ),
Group( :Batch, :Time ),
Sort by Column Property
);
// Graph the data
Graph Builder(
Size( 528, 454 ),
Show Control Panel( 0 ),
Variables( X( :Time ), Y( :Ethanol ), Overlay( :Batch ) ),
Elements( Line( X, Y, Legend( 15 ) ), Points( X, Y, Legend( 16 ) ) ),
Local Data Filter(
Add Filter(
columns( :Batch ),
Where( :Batch == {1, 2} ),
Display( :Batch, N Items( 4 ) )
)
)
);
Jim