2
$\begingroup$

I can´t find the option for larger ticks

NumberLinePlot[{0, 2}, 
 PlotStyle -> Directive[Thick, PointSize[0.00016]], 
 AxesStyle -> Thickness[0.004], TicksStyle -> {Thickness[0.004]}, 
 LabelStyle -> {20, Bold}, ImageSize -> Full, 
 Ticks -> Table[i, {i, 0, 2, 0.1}]]
$\endgroup$

3 Answers 3

7
$\begingroup$

Ticks -> Details

enter image description here

NumberLinePlot[{0, 2}, 
 PlotStyle -> Directive[Thick, PointSize[0.00016]], 
 AxesStyle -> Thickness[0.004], TicksStyle -> {Thickness[0.004]}, 
 LabelStyle -> {20, Bold}, ImageSize -> Full, 
 Ticks -> {Table[{i, i, .02}, {i, 0, 2, 0.1}], None}]

enter image description here

Use Ticks -> {Table[{i, i, {.02, 0}}, {i, 0, 2, 0.1}], None} to get

enter image description here

Use Ticks -> {Table[{i, i, {0, .02}}, {i, 0, 2, 0.1}], None} to get

enter image description here

To get tick positions automatically selected, use the function Charting`ScaledTicks with the option TicksLength (or "TicksLength"):

Ticks -> {Charting`ScaledTicks[{Identity, Identity}, 
      TicksLength -> {.02, 0}][##] /. _AbsoluteThickness -> 
     Directive[Black, Thickness[0.004]] &, None}

enter image description here

$\endgroup$
3
$\begingroup$
Clear["Global`*"]

xticks = Join[{#, 
      "", {0.01`, 0.`}, {GrayLevel[0.], AbsoluteThickness[0.6`]}} & /@
     Range[0, 2, 0.1],
   {#, #, {0.02`, 0.`}, {GrayLevel[0.], AbsoluteThickness[1]}} & /@ 
    Range[0, 2, 0.5]];

nlp = NumberLinePlot[{0, 2},
  PlotStyle -> Directive[Thick, PointSize[0.00016]],
  AxesStyle -> Thickness[0.004],
  LabelStyle -> {20, Bold},
  ImageSize -> Full,
  Ticks -> {xticks, None}]

enter image description here

$\endgroup$
0
$\begingroup$

See this question. LevelScheme does that.

$\endgroup$

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