I am trying to add some ticks but I would like the default ticks on the $x$-axis to keep appearing. If I use the following they vanish:
Plot[x, {x, 0, 4}, Ticks -> {{Pi, 2}, Automatic}]
With
plot = Plot[x, {x, 0, 4}]
based on this answer:
ticks = Charting`FindTicks[{0, 1}, {0, 1}] @@ PlotRange[plot][[1]];
newticks = {{Pi, Pi}}~Join~ticks;
Show[plot, Ticks -> {newticks, Automatic}]
[[1]]
to [[2]]
, make some newticks2
like in the answer, and do Ticks -> {newticks, newticks2}
.
$\endgroup$
{Pi, Pi}
with {Pi, Style[Pi, Red]}
.
$\endgroup$