cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
rw1
rw1
Level I

Mouse location graph builder

Is there a way to get the mouse location on a graph created using graph builder?

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Craige_Hales
Super User

Re: Mouse location graph builder

yes, you can use the cross hair tool (shortcut C, A to get back to Arrow)

8067_crosshair.png

to read coordinates off a graph.

If you are writing JSL code to do something, you can add a graphic script:


Graph Builder(


    Size( 522, 450 ),


    Show Control Panel( 0 ),


    Variables( X( :weight ), Y( :height ) ),


    Elements( Points( X, Y, Legend( 6 ) ), Smoother( X, Y, Legend( 7 ) ) ),


    SendToReport(


        Dispatch(


            {},


            "Graph Builder",


            FrameBox,


            {Add Graphics Script(


                2,


                Description( "Script" ),


                If( Is Empty( g_x1 ),


                    g_x1 = [139.41, 134.50, 92.26];


                    g_y1 = [68.63, 52.27, 63.04];


                );


                Drag Line( g_x1, g_y1 );


            ), Grid Line Order( 1 ), Reference Line Order( 3 )}


        )


    )


)



there are several script functions similar to drag_line that allow the graph to interact with the mouse.  This example is built in to the graph's Customize->plus->samples.  You can drag the endpoints.

Craige

View solution in original post

2 REPLIES 2
Craige_Hales
Super User

Re: Mouse location graph builder

yes, you can use the cross hair tool (shortcut C, A to get back to Arrow)

8067_crosshair.png

to read coordinates off a graph.

If you are writing JSL code to do something, you can add a graphic script:


Graph Builder(


    Size( 522, 450 ),


    Show Control Panel( 0 ),


    Variables( X( :weight ), Y( :height ) ),


    Elements( Points( X, Y, Legend( 6 ) ), Smoother( X, Y, Legend( 7 ) ) ),


    SendToReport(


        Dispatch(


            {},


            "Graph Builder",


            FrameBox,


            {Add Graphics Script(


                2,


                Description( "Script" ),


                If( Is Empty( g_x1 ),


                    g_x1 = [139.41, 134.50, 92.26];


                    g_y1 = [68.63, 52.27, 63.04];


                );


                Drag Line( g_x1, g_y1 );


            ), Grid Line Order( 1 ), Reference Line Order( 3 )}


        )


    )


)



there are several script functions similar to drag_line that allow the graph to interact with the mouse.  This example is built in to the graph's Customize->plus->samples.  You can drag the endpoints.

Craige
rw2
rw2
Level I

Re: Mouse location graph builder

Thanks - this worked great.