The script below loads some data and should create twice the same plot.
The first one by referring to the column name by using a variable (test1), the second one by calling the column name directly.
The second one works fine, but for the first one I get an empty plot area. I guess there is a problem with how I define or call test1. I have tried different approaches, but so far nothing worked.
Names Default To Here( 1 );
// Import the Excel file with specified settings
dt = Open(
"/Y:/.../file.xlsx",
Worksheets( "Pivot table for JMP" ),
Worksheet Settings(
1,
Has Column Headers( 1 ),
Headers Start on Row( 2 ),
Data Starts on Row( 3 )
)
);
// Filter rows to include only "AAA" in "Common Designation"
dt_AAA = dt << Subset(
Rows( :Common Designation == "AAA" ),
Include All Columns,
Name( "Filtered AAA" )
);
size = "AAA" ;
Match( size,
"AAA", test1 = column ("PL (min)"),
);
New Window( size,
V List Box(
Graph Builder(
Size( 500, 297 ),
Show Control Panel( 0 ),
Variables( X( :test1 ), Y( :Chemistry ), Color( :Chemistry ) ),
Elements( Points( X, Y, Legend( 106 ) ) )
),
Graph Builder(
Size( 500, 297 ),
Show Control Panel( 0 ),
Variables( X( :"PL (min)"n ), Y( :Chemistry ), Color( :Chemistry ) ),
Elements( Points( X, Y, Legend( 106 ) ) )
),
),
);