I have a List of data and plotted them but i want scales on the x-axis shown as [10^-4 , 10^-2 , 0.02 , 0.04 , 0.06 , 0.08 ] instead of 1 through ,say,9 (i.e. number of data shown in the axes). can anybody know how do i that?


Very Thanks.


2 Answers 2


Because Mathematica will not want to show the .0001 tick value (it falls too near the origin), for this labeling problem it is better to use a frame than to try to relabel the axes.

ListPlot[Table[{m, m^2}, {m, .0001, 0.09, 0.01}],
  Frame -> True,
  FrameTicks -> {Automatic, {Join[{.0001, .01}, Range[.02, .08, .02]], None}}]



Using the option DataRange will basically do what you want

ListPlot[Table[m^2, {m, 10^-4, 0.09, 0.01}], DataRange -> {10^-4, 0.09}]

enter image description here

However, to get literally the labels you specified, you will need to also specify custom Ticks

  • $\begingroup$ very thanks. this is what i wanted. $\endgroup$
    – Ali184
    Feb 16, 2017 at 15:44
  • $\begingroup$ @Ali184 Please consider accepting the answer(by clicking on ✓ right symbol). $\endgroup$
    – L.K.
    Feb 17, 2017 at 11:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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