4
$\begingroup$

Please, how to remove the 15 zeros after the comma and keep only one digit in the plot below?

enter image description here

This is the code for example

 Table[{n, n}, {n, 10^-2, 1.4, 2. 10^-1}]

 (* {{0.01, 0.01}, {0.21, 0.21}, {0.41, 0.41}, {0.6100000000000001,0.6100000000000001}, {0.81, 0.81}, {1.01, 1.01}, {1.21, 1.21}} *)

ListPlot[Table[{n,n}, {n,10^-2,1.4,0.05}], Joined -> True, Frame -> True,PlotRange ->{{0.,1.4},{0.,1.4}},GridLines ->Automatic]

My MAT version

$Version
(* 13.0.0 for Microsoft Windows (64-bit) (December 3, 2021)*)
$\endgroup$
8
  • 2
    $\begingroup$ Please edit your question to include the code you used to generate the plot. Without it, we can't tell you what went wrong $\endgroup$
    – Lukas Lang
    Jun 18 at 18:51
  • 1
    $\begingroup$ What version are you using? I get this result: i.stack.imgur.com/dj9Wc.jpg $\endgroup$
    – Lukas Lang
    Jun 18 at 19:20
  • 1
    $\begingroup$ I got i.stack.imgur.com/0xcF5.png and i.stack.imgur.com/XgToY.png $\endgroup$ Jun 18 at 19:27
  • 3
    $\begingroup$ Did you set PrintPrecision to a large value by chance? (Like this: i.stack.imgur.com/GlTQ3.png) Try something like Style[ListPlot[...], PrintPrecision -> 6]. If you're not sure what your PrintPrecision is set to, evaluate Options[$FrontEnd, PrintPrecision]. $\endgroup$
    – Michael E2
    Jun 18 at 22:04
  • 4
    $\begingroup$ Try evaluating SetOptions[$FrontEnd, PrintPrecision -> 10] to change your global option setting for PrintPrecision, then re-evaluate your ListPlot. (MichaelE2's Style suggestion should work by itself too, though.) $\endgroup$
    – thorimur
    Jun 18 at 23:22

1 Answer 1

6
$\begingroup$

As thorimur and Michael E2 said , I just applied

SetOptions[$FrontEnd,PrintPrecision -> 10]

to change the global option setting for PrintPrecision. I get

enter image description here

Thank you all.

$\endgroup$

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.