The tool "get coordinates" (clicking on a plot), seems to work with a fixed number of significant digits (4), in a way that we can quickly lose sensibility (the tool really becomes useless). The following example shows the problem:

Plot[a, {a, 1950, 1950.2}]

enter image description here

I imagine that this is a feature tending to the bug classification. Is there a way of correcting this behavior? (on 9.0.1)

  • $\begingroup$ Why don't you use ClickPane[Plot[a, {a, 1950, 1950.2}], (pts = #) &]? $\endgroup$ – John Feb 11 '14 at 13:27
  • 1
    $\begingroup$ I'd report it as a bug ... $\endgroup$ – Szabolcs Feb 11 '14 at 13:35
  • 3
    $\begingroup$ Strangely using CoordinatesToolOptions -> {"CopiedValueFunction" -> (# &)} gives 6 digits. $\endgroup$ – Simon Woods Feb 11 '14 at 13:41
  • 3
    $\begingroup$ Strongly related MathGroups thread: "Get Graphics Coordinates accuracy." The solution suggested is CoordinatesToolOptions -> {"DisplayFunction" -> (#&), "CopiedValueFunction" -> (SetPrecision[#, $MachinePrecision]&)}. $\endgroup$ – Alexey Popkov Feb 12 '14 at 13:16
  • 2
    $\begingroup$ Also related Wolfram Blog post: "Get Coordinates: New in 6.0.2." $\endgroup$ – Alexey Popkov Feb 12 '14 at 13:18


Plot[a, {a, 1950, 1950.2}, 
 CoordinatesToolOptions -> {"DisplayFunction" ->  
    Function[pt, Row[{"point=", NumberForm[pt, 6]}]], 
   "CopiedValueFunction" -> Function[pt, pt]}]

of course you can change the "DisplayFunction".

enter image description here


Another possibility, which increases the number of digits displayed is the following. Define the two functions:

plotCopiedValueF[x_] := (SetPrecision[#, $MachinePrecision] & /@ x);
plotDisplayF[x_] := (InputForm /@ N[x]);

CoordinatesToolOptions -> {
    "CopiedValueFunction" -> plotCopiedValueF,
    "DisplayFunction" -> plotDisplayF

The result is shown below, and also the copied values have the same number of decimal digits:

{ {3.3347506348627886652025154035`15.954589770191003, {0.0433058311806071571936627151`15.954589770191003} }


  • $\begingroup$ This is quite strange. Note that if you use MachinePrecision instead of $MachinePrecision then it does not work. $\endgroup$ – Szabolcs Feb 12 '14 at 0:49
  • $\begingroup$ I think you forgot to change your function names in the CoordinatesToolOptions. $\endgroup$ – xzczd Feb 12 '14 at 5:01
  • $\begingroup$ @user8074 on my computer, the copied values only have 6 significant digits (the displayed values are "complete"). It's much better than before, but why the difference with yours? (XP SP3 9.0.1) $\endgroup$ – P. Fonseca Feb 12 '14 at 13:01
  • $\begingroup$ @xzczd You are probably right: I changed my orgiginal names to clarify the meaning and possibly forgot to change them everywhere $\endgroup$ – user8074 Feb 12 '14 at 19:47
  • $\begingroup$ @P.Fonseca I do not know: in my case it worked both under XP and Vista. I did not check on Win7 or Win8. I am rather accustomed to some inconsistences in MMA and often just stop at the first working solution without asking too much... $\endgroup$ – user8074 Feb 12 '14 at 19:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.