Hi, I have a scatter plot with a line of best fit to which I've added 2 reference lines to the x-axis.
Is there an easy way of changing the background of the area between both reference lines to light-grey.
Thanks!
One option is to use some scripting and add graphic script
Names Default To Here(1); dt = Open("$SAMPLE_DATA/Big Class.jmp"); gb = dt << Graph Builder( Variables(X(:weight), Y(:height)), Elements(Points(X, Y, Legend(3))), SendToReport( Dispatch( {}, "height", ScaleBox, {Add Ref Line(65, "Solid", "Black", "", 1), Add Ref Line(55, "Solid", "Black", "", 1)} ) ) ); rep = gb << report; framebox = rep[frame box(1)]; framebox << Add Graphics Script( Transparency(0.5); Fill Color("Gray"); Rect(X Origin(), 65, X Origin() + X Range(), 55, 1) );
You can also use a reference region. The region is independent of the lines. You can use either one or both of them.
Names Default To Here( 1 ); dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); gb = dt << Graph Builder( Variables( X( :weight ), Y( :height) ), Elements( Points( X, Y, Legend( 3 ) ) ) ); rpt = gb << Report; rpt[AxisBox(2)] << Add Ref Line( 55, "Solid", "Black", "", 1 ) << Add Ref Line( 65, "Solid", "Black", "", 1 ) << Add Ref Line( { 55, 65 }, "Solid", "Green", "", 1, 0.25 );