The script creates the graph's exactly as I want them, except it creates them using points/smoother in the element statements (note that variables are removed to shorten the script length). This is the graph code from the script output:
Graph Builder(
Size( 809, 629 ),
Show Control Panel( 0 ),
Variables(
...
)
),
Elements(
Position( 1, 1 ),
Points( X, Y( 1 ), Y( 2 ), Legend( 1 ) ),
Smoother( X, Y( 1 ), Y( 2 ), Legend( 2 ) )
),
Elements(
Position( 1, 2 ),
Points( X, Y( 1 ), Y( 2 ), Legend( 3 ) ),
Smoother( X, Y( 1 ), Y( 2 ), Legend( 4 ) )
),
Elements(
Position( 1, 3 ),
Points( X, Y( 1 ), Y( 2 ), Legend( 5 ) ),
Smoother( X, Y( 1 ), Y( 2 ), Legend( 6 ) )
),
Elements(
Position( 1, 4 ),
Points( X, Y( 1 ), Y( 2 ), Legend( 7 ) ),
Smoother( X, Y( 1 ), Y( 2 ), Legend( 8 ) )
),
Elements(
Position( 1, 5 ),
Points( X, Y( 1 ), Y( 2 ), Legend( 9 ) ),
Smoother( X, Y( 1 ), Y( 2 ), Legend( 10 ) )
)
);
And I would prefer it to use Lines instead:
Graph Builder(
Size( 696, 590 ),
Show Control Panel( 0 ),
Variables(
...
)
),
Elements( Position( 1, 1 ), Line( X, Y( 1 ), Y( 2 ), Legend( 11 ) ) ),
Elements( Position( 1, 2 ), Line( X, Y( 1 ), Y( 2 ), Legend( 12 ) ) ),
Elements( Position( 1, 3 ), Line( X, Y( 1 ), Y( 2 ), Legend( 13 ) ) ),
Elements( Position( 1, 4 ), Line( X, Y( 1 ), Y( 2 ), Legend( 14 ) ) ),
Elements( Position( 1, 5 ), Line( X, Y( 1 ), Y( 2 ), Legend( 15 ) ) )
);
Whenever try to "Insert Into" the elements statement it just adds a nested elements statement instead of separate elements statements. And the graph builder seems to just ignore those nested elements statements.