Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6842257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:04:40+00:00 2026-05-27T00:04:40+00:00

When the mouse cursor is over a 2D plot in Wolfram|Alpha, a pair of

  • 0

When the mouse cursor is over a 2D plot in Wolfram|Alpha, a pair of grey lines appear that help you read the coordinates off the x and y axes.
For example, I have the mouse over one of the turning points in the following plot of the Airy function.

Web

The above can also be obtained inside Mathematica using

WolframAlpha["Plot Ai(x)", {{"Plot", 1}, "Content"}]

Nb

which has the added advantage of some sort of locator showing the coordinates.


How can I emulate such behavior in a normal Mathematica graphics/plot?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:04:40+00:00Added an answer on May 27, 2026 at 12:04 am

    Here’s another approach using Nearest, that’s a bit different from Simon’s:

    plot = Plot[{Sin[x], Cos[x]}, {x, -2 Pi, 2 Pi}];
    With[{nf = Nearest[Flatten[Cases[Normal[plot], Line[p_, ___] :> p, Infinity], 1]]},
       Show[plot, 
          Epilog -> 
             Dynamic[DynamicModule[{
                pt = First[nf[MousePosition[{"Graphics", Graphics}, {0, 0}]]], 
                scaled = Clip[MousePosition[{"GraphicsScaled", Graphics}, {0, 0}], {0, 1}]
                }, 
               {
                {If[scaled === None, {}, 
                   {Lighter@Gray, Line[{
                       {Scaled[{scaled[[1]], 1}], Scaled[{scaled[[1]], 0}]}, 
                       {Scaled[{1, scaled[[2]]}], Scaled[{0, scaled[[2]]}]}
                       }]
                   }]}, 
                {AbsolutePointSize[7], Point[pt], White, AbsolutePointSize[5], Point[pt]},
                Text[Style[NumberForm[Row[pt, ", "], {5, 2}], 12, Background -> White], Offset[{7, 0}, pt], {-1, 0}]}
             ]]
        ]
     ]
    

    This was put together from example I had laying around. (I don’t like the free-floating drop-lines combined with the point tracking; either on its own feels fine.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to show mouse coordinates while the cursor over the red div and
I have the following CSS that hides the mouse cursor for anything on the
I am trying to create an effect when you place the mouse cursor over
i have this link <a>jander</a> . When I put the mouse cursor over it,
Stack Fans, I have a div, that as you mouse off it, I want
When the mouse cursor moves over an image, I would like to display an
how can I prevent triggering and showing JPopupMenu only if is Mouse Cursor over
I want to do this: https://github.com/rails/rails/commit/f50aeda2f73b47c47664e3651c638ba624418b8b See how, as your mouse cursor moves over
I want to alert an option when the mouse-cursor is over it. I use
Is it possible to hide the mouse cursor in a web browser? I've done

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.