Hi Ian,
Thank you for your fast response.
This is exactly what I am looking for but I need it to work across 3 plots
Using the "$SAMPLE_DATA/Big Class.jmp dataset I added a plot for :age but unfortunately when I try to set this up to work across 3 plots I have been unable to get it working. I can get 2 out of 3 working at any time.
Would it be possible to add some comments to the script to explain what is the logic? My apologies for this inconvenience.
In my case it would suffice that when clicking on the center plot (:weight) the reference line would be drawn upwards and downwards covering all plots.
Here is what I have done:
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
gb = dt << Graph Builder(
Size( 528, 448 ),
Show Control Panel( 0 ),
Variables( X( Transform Column( "Row", Formula( Row() ) ) ), Y( :height ), Y( :weight ), Y( :age ) ),
);
::exx = 1;
gbfb3 = Report(gb)[FrameBox(3)];
gs3 = Expr(
gbfb3 << AddGraphicsScript(
PenColor("Red");
PenSize(2);
Mousetrap(::exx = x; gbfb1 << removeGraphicsScript(1); gs1);
VLine(::exx);
);
);
gbfb1 = Report(gb)[FrameBox(1)];
gs1 = Expr(
gbfb1 << AddGraphicsScript(
PenColor("Red");
PenSize(2);
Mousetrap(::exx = x; gbfb2 << removeGraphicsScript(1); gs2);
VLine(::exx);
);
);
gbfb2 = Report(gb)[FrameBox(2)];
gs2 = Expr(
gbfb2 << AddGraphicsScript(
PenColor("Red");
PenSize(2);
Mousetrap(::exx = x; gbfb3 << removeGraphicsScript(1); gs3);
VLine(::exx);
);
);
gs1;
gs2;
gs3;
The resulting plot looks like this:
When I click inside the "age" plot, all goes well with the Ref. Line moving with the mouse across all plots.
However when I click inside the "height" plot the following happens:
The Reference line moves through "height" and "weight" but not "age"
Likewise when I click inside the "weight" plot the following happens:
The Reference line moves through "weight" and "age" but not "height"
Could you please take a look?
Thanks,
Philip