JSL - Adding a horizontal line (from a variable) to a plotI am trying to add a horizonal line to a plot that I have made where the hieght of the line is a variable in the JSL (based on statitical calucations. So for example:
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 I am sure this is another easy thing to do that I will add to my knowledge base soon.... Thank you in advance.
Brad
Re: JSL - Adding a horizontal line (from a variable) to a plotThanks Jim this did the trick!
Re: JSL - Adding a horizontal line (from a variable) to a plotHere is a script that does what you want:
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 );