0
$\begingroup$

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:

enter image description here

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

$\endgroup$
4
  • 1
    $\begingroup$ 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? $\endgroup$
    – Domen
    Nov 24 '21 at 9:54
  • $\begingroup$ I hope the edit clarifies what I would like to achieve $\endgroup$
    – geom
    Nov 24 '21 at 10:48
  • 1
    $\begingroup$ Ah, I see. The solution can be found either in this answer or this answer. $\endgroup$
    – Domen
    Nov 24 '21 at 11:20
  • $\begingroup$ Thanks, the answer is here: mathematica.stackexchange.com/questions/136381/… $\endgroup$
    – geom
    Nov 24 '21 at 11:37

Browse other questions tagged or ask your own question.