I have written a little script, that compares a data table of the structure of your example, using the Freq drop zone of Graph Builder, vs. expanding the data into real observations and then doing a graph builder based upon the expanded data.
Names Default To Here( 1 );
/*dt = New Table( "Example",
Add Rows( 16 ),
New Column( "#non conformities",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [1, 1, 1, 4, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2] )
),
New Column( "X",
Numeric,
"Nominal",
Format( "Best", 12 ),
Set Values( [2, 4, 3, 5, 5, 4, 2, 1, 2, 3, 3, 1, 4, 2, 4, 1] )
),
New Column( "Y",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[87.6761003304139, 69.8609169241848, 87.4616511288794, 70.3768356100406, 70.8645383423261,
85.4167498650613, 85.0039197906326, 83.0781777845281, 81.445262575383, 77.6469864353613,
73.528707708996, 91.6793408130229, 82.0904076861622, 74.5541146955842, 95.3095947684666,
80.9917511770325]
)
)
);*/
dt = current data table();
dt << Add Multiple Columns( "Y", Col Max( :name( "#non conformities" ) ) - 1, numeric, after last );
For Each Row( For( i = 2, i <= :Name( "#non conformities" ), i++, Column( 2 + i )[Row()] = :Y[Row()] ) );
theList = {"Y"};
For( i = 1, i <= Col Max( :name( "#non conformities" ) ) - 1, i++,
Insert Into( theList, "Y " || Char( i ) )
);
dtStack = dt << Stack( columns( theList ), Source Label Column( "Label" ), Stacked Data Column( "Data" ) );
dtStack << select where( Is Missing( :Data ) == 1 );
dtStack << delete rows;
New Window( "Comparison",
H List Box(
dt << Graph Builder(
Size( 528, 450 ),
Show Control Panel( 0 ),
Variables( X( :X ), Y( :Y ), Frequency( :Name( "#non conformities" ) ) ),
Elements( Box Plot( X, Y, Legend( 6 ) ) ),
SendToReport( Dispatch( {}, "graph title", TextEditBox, {Set Text( "Using Freq" )} ) )
),
dtStack << Graph Builder(
Size( 528, 450 ),
Show Control Panel( 0 ),
Variables( X( :X ), Y( :Data ) ),
Elements( Box Plot( X, Y, Legend( 6 ) ) ),
SendToReport( Dispatch( {}, "graph title", TextEditBox, {Set Text( "Stacked" )} ) )
)
)
);
If you run this script against your data, you should get identical graphs of the form of your Freq version created with your data.
Jim