# Multi graphs in one plot with axis labels in multiples of Pi [duplicate]

How can I show Pi instead of numbers in x-axis of the plot below?

Plot[{Sin[t], Cos[t]^2, Cos[t]}, {t, -Pi/2, Pi/2}, PlotStyle -> {Red, Blue, Orange}]

• use the option Ticks -> {Range[-Pi/2, Pi/2, Pi/8], Automatic}?
– kglr
Aug 18, 2018 at 9:52
• Thank you for your comment. Ticks do what I need but I need axis to be more thick @kglr Aug 18, 2018 at 9:56
• This is already a different question. What you need is AxesStyle -> Thick. Have a look at other options and examples of Plot.
– Johu
Aug 18, 2018 at 10:16

You can create a custom Ticks function using FindDivisions:

• FindDivisions[{$x_{min}$,$x_{max}$, {$dx_1$, $dx_2$, …}},{$n_1$, $n_2$, …}]
uses spacings that are forced to be multiples of $dx_1$, $dx_2$, ….
 ticksF = Join[Thread[{#, #, {0.03, 0.}, Thickness[0.005]}, List, 2],
Thread[{Complement[Join @@ #2, #], "", {0.02, 0.}, Thickness[0.003]}, List, 1]] & @@
FindDivisions[##] &;

Plot[{Sin[t], Cos[t]^2, Cos[t]}, {t, - Pi / 2, Pi / 2},
PlotStyle -> {Red, Blue, Orange},
Ticks -> {ticksF[{-Pi / 2, Pi / 2,  {Pi/8, Pi / 32}}, {4, 10}], Automatic},
AxesStyle -> Thick]


Use

Ticks -> {ticksF[{-Pi/2, Pi/2, {Pi/8, Pi/32}}, {8, 10}], Automatic}


to get