0
$\begingroup$

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?

$\endgroup$
  • $\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
2
$\begingroup$

Example

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

Output

enter image description here

| improve this answer | |
$\endgroup$

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