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

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



This question already has an answer here:



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]



This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.





use the option Ticks -> Range[-Pi/2, Pi/2, Pi/8], Automatic?
– kglr
2 days ago


Ticks -> Range[-Pi/2, Pi/2, Pi/8], Automatic





Thank you for your comment. Ticks do what I need but I need axis to be more thick @kglr
– Holger Mate
2 days ago






This is already a different question. What you need is AxesStyle -> Thick. Have a look at other options and examples of Plot.
– Johu
2 days ago



AxesStyle -> Thick


Plot




1 Answer
1



You can create a custom Ticks function using FindDivisions:


Ticks


FindDivisions


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]



enter image description here



Use


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



to get



enter image description here

Popular posts from this blog

How can temperature be calculated given relative humidity and dew point?

Avoiding race conditions in Kotlin, Smartcast is impossible runtime exception

Oracle ADF: Log file reports ADFContext Leak