I would like to set up a custom graphics script so each graph gets a unique line based on information contained in an associative array. In the example below, I want to have a graph on the line differently for each category... for my actual use, I will need the graph to 'recognize' the heading it's under so I can use the correct values for the line creation.
For the example image below, I manually updated the "F" graphics script to be "F". So I am looking to find syntax to "gather the graph info" ... in my head, if I can grab the outline box title, I can manipulate that to get what I need... but I am not sure if that is the only/best option.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
dt << Bivariate(
Y( :height ),
X( :weight ),
By( :sex ),
SendToReport(
Dispatch(
{},
"1",
ScaleBox,
{Format( "Fixed Dec", 12, 0 ), Min( 30 ), Max( 180 ), Inc( 20 ),
Minor Ticks( 1 )}
),
Dispatch(
{},
"Bivar Plot",
FrameBox,
{Add Graphics Script(
2,
Description( "" ),
test = Associative Array( {{"F", {0.1, 50}}, {"M", {.8, 0}}} );
///gather graph info to get "F" or "M" from output
graphInfo = "M";// need to extract so it's "F" for female graph
Y Function( test[graphInfo][1] * x + test[graphInfo][2], x );
), Grid Line Order( 1 ), Reference Line Order( 3 )
}
)
)
);