Calling ListPlot[{0, 0.1, 0.2}, DataRange -> {0, 2}] produces a plot with markers in $x = 0.5$, $x = 1$, $x = 1.5$, and $x=2.0$.

I want to have markers only in $x = 0$, $x=1$, and $x=2$ (the integers). How can I do this?


closed as off-topic by MarcoB, Jason B., m_goldberg, J. M. is away Jul 8 '16 at 22:44

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – MarcoB, Jason B., m_goldberg, J. M. is away
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ Ticks -> {{0,1,2,3,4,5}, Automatic} ? $\endgroup$ – BlacKow Jul 8 '16 at 20:00
  • 3
    $\begingroup$ or Ticks -> {Range[0,2,1], Automatic} $\endgroup$ – David G. Stork Jul 8 '16 at 20:04


 {0, .1, .2},
 Frame -> True,
 FrameTicks -> {{Automatic, None}, {{0, 1, 2}, None}}


enter image description here


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