# axis label format [duplicate]

I am plotting the following function

g[x_, y_] := 2 (1 + Cos[x] + Cos[y])
Plot3D[g[x, y], {x, -π, π}, {y, -π, π}, PlotRange -> Full,
AxesLabel -> {Subscript[k, x], Subscript[k, y], Subscript[λ, i]},
AxesStyle -> Directive[FontFamily -> "Times", FontSize -> 35],
Mesh -> None, PlotStyle -> {Directive[Blue, Specularity[White, 20], Opacity[0.9]]},
Lighting -> "Neutral", Ticks -> {{-Pi, -Pi/2, 0, Pi/2, Pi}, {-Pi, -Pi/2, 0, Pi/2, Pi},{-2, 0, 2, 4, 6}},
TicksStyle -> Directive[FontFamily -> "Times", Black, FontSize -> 25],
PlotPoints -> 100, BoxRatios -> {1., 1., .5}]


The output is:

How can I change the ticks $$\pm \frac{\pi}{2}$$ to $$\pm \pi/2$$?

• I don't think I understand your question. The plot seems fine to me. Every expression in Wolfram Language has different "representations" (or forms). $\pi/2$ can be represented by its InputForm as Pi/2 or by its FullForm as Times[Rational[1, 2], Pi]. But these two expressions are two sides of the same coin, so to speak. What exactly are you trying to achieve? Nov 24 '21 at 9:54
• I hope the edit clarifies what I would like to achieve
– geom
Nov 24 '21 at 10:48
• Ah, I see. The solution can be found either in this answer or this answer. Nov 24 '21 at 11:20
• Thanks, the answer is here: mathematica.stackexchange.com/questions/136381/…
– geom
Nov 24 '21 at 11:37