# Remove the label from a default tick

How can I delete tick labels -2 and 2 so that the values -1.8 and 1.8 doesn't overlap with each other; i.e., I want to keep the ticks at -2 and 2, but not their labels.

This is the code I am using:

plot = Plot[{-6 x - x^3/3 + 10 ArcTan[x]}, {x, -2.2, 2.2}]
ticks = ChartingFindTicks[{0, 1}, {0, 1}] @@ PlotRange[plot][];
ticks2 = ChartingFindTicks[{0, 1}, {0, 1}] @@ PlotRange[plot][];
newticks = {{0.72, 0.72}, {-0.72, -0.72}}~Join~ticks;
newticks2 = {{1.80, 1.80}, {-1.80, -1.80}}~Join~ticks2;
Show[plot, Ticks -> {newticks, newticks2}] Modify newticks2 to remove the unwanted ticks:

newticks3 = newticks2 /. {2. | -2., __} :> Sequence[]; (* or *)
newticks3 = DeleteCases[newticks2, {2. | -2., __}]  (* thanks: MikeHoneychurch *)

Show[plot, Ticks -> {newticks, newticks3}] Update: To remove the labels and modify the major ticks to minor ticks at 2 and -2:

newticks4 = newticks2 /. {x : 2. | -2., __} :> {x, "", {0.005, 0.}, {Thickness[0.001]}};
Show[plot, Ticks -> {newticks, newticks4}] • Thank you It works but now I want to ask you what are the "___" for? – Shai Léger Dec 31 '17 at 3:25
• @Shai, you are welcome. ___ (BlankNullSequence) is a pattern object that can stand for any sequence of zero or more Mathematica expressions. Btw, I meant to use __ (BlankSequence) . Updated with the correction. – kglr Dec 31 '17 at 3:34
• Maybe also add a DeleteCases version? – Mike Honeychurch Dec 31 '17 at 4:20
• @MikeHoneychurch, great idea. Thank you. – kglr Dec 31 '17 at 4:26