JSL - Ajout d'une ligne horizontale (à partir d'une variable) à un tracéJ'essaie d'ajouter une ligne horizontale à un tracé que j'ai réalisé où la hauteur de la ligne est une variable dans le JSL (basée sur des calculs statistiques. Ainsi, par exemple :
test_here = temp << Graph Builder(
Size( 534, 448),
Show Control Panel(0),
Variables( X( :Panels), Y( :Score), Color (:Code)),
Elements( Points(X,Y,Legend(24), Jitter(0)))
);
// Want to add the line Y = upper_bound <- Just a number calculated prior to this Je suis sûr que c'est une autre chose facile à faire que j'ajouterai bientôt à ma base de connaissances.... Merci d'avance.
Brad
Re: JSL - Ajout d'une ligne horizontale (à partir d'une variable) à un tracéMerci Jim, cela a fait l'affaire !
Re: JSL - Ajout d'une ligne horizontale (à partir d'une variable) à un tracéVoici un script qui fait ce que vous voulez :
Names Default to Here( 1 );
test_here = Graph Builder(
Variables( X( :Column 6 ), Y( :height ), Color( :sex ) ),
Elements( Points( X, Y, Legend( 3 ) ) ),
SendToReport(
Dispatch(
{},
"400",
LegendBox,
{Legend Position( {3, [0, -1]} ), Position( {0, -1} )}
)
)
);
upper_bound=70;
report(test_here)[axisbox(2)] << Add Ref Line( upper_bound, "solid", black, "", 2 );