# About number truncation of ticks display in ListPlot

In my problem, I need to plot a figure in a relatively small region of the $x$ axis, e.g.,

 ListPlot[{RandomReal[#] + 10^4,
RandomReal[#]} & /@ (Range[100] 10^-10), Frame -> True, Axes -> False]


and the figure is displayed properly, but all the tick marks have the same label:

Is there any clever way to get rid of this problem?

-

Oh great! I think U know well about Chinese language, SZabolcs. – yulinlinyu May 11 '12 at 1:26
Related: (3436) – Mr.Wizard Oct 29 '14 at 9:55

You can define your own function for FrameTicks :

ticks[min_, max_] := {#, NumberForm[#, 20]} & /@
N[FindDivisions[{min, max}, 5]]

ListPlot[{RandomReal[#] + 10^4,
RandomReal[#]} & /@ (Range[100] 10^-10), Frame -> True,
FrameTicks -> {{Automatic, None}, {ticks, None}}]


Just choose your own preferred presentation format of the given values...

ticks[min_, max_] := {#, Grid[{{min}, {"+"}, {# - min}}]} & /@
N[FindDivisions[{min, max}, 5]]

ListPlot[{RandomReal[#] + 10^4,
RandomReal[#]} & /@ (Range[100] 10^-10), Frame -> True,
FrameTicks -> {{Automatic, None}, {ticks, None}},FrameStyle->Medium]


-
Excellent work!! – yulinlinyu May 7 '12 at 13:04
ListPlot[{RandomReal[#] + 10^4, RandomReal[#]} & /@ (Range[100] 10^-10), Frame -> True,
Axes -> False, FrameLabel -> {"x - 10^4", "y"}] /.
List[x_, y_] /; x > 10000 -> List[x - 10000, y]


-
i'm sure it'a a way to solve it. – yulinlinyu May 7 '12 at 13:05