4

I want to run my code

ContourPlot3D[(2 Zeta[1 + \[Alpha]] - 
   PolyLog[1 + \[Alpha], Exp[I*k]] - 
   PolyLog[1 + \[Alpha], Exp[-I*k]] - 2 A^2), {k, -2 \[Pi], 
  2 \[Pi]}, {A, 0, 30}, {\[Alpha], 0.001, 2}, 
 PlotLegends -> Automatic]

but even after a very long time it does not complete. Is there something I can do to make it finish compiling?

KZ-Spectra
  • 175
  • 4
  • 3
    This has long been a problem, even in 2D. See [https://mathematica.stackexchange.com/q/1008/5467] . I'm not aware of some improvement since then. – andre314 Aug 24 '23 at 21:54

1 Answers1

6

An alternative method using ListContourPlot3D:

expr = 2 Zeta[1 + α] - PolyLog[1 + α, Exp[I*k]] - PolyLog[1 + α, Exp[-I*k]] - 2 A^2;

ListContourPlot3D[Table[expr, {k, -2 π, 2 π}, {A, 0, 30}, {α, 0.001, 2}], Contours -> 4, Mesh -> None, AxesLabel -> {Style["k", Black, 18], Style["A", Black, 18], Style["α", Black, 18]}, PlotLegends -> Automatic]

enter image description here

Or using MaTeX:

<< MaTeX`
ListContourPlot3D[Table[expr, {k, -2 π, 2 π}, {A, 0, 30}, {α, 0.001, 2}], 
Contours -> 4, Mesh -> None, AxesLabel -> {MaTeX["k", Magnification -> 1.5], 
MaTeX["A", Magnification -> 1.5], MaTeX["\\alpha", Magnification -> 1.5]}, 
PlotLegends -> Automatic]

enter image description here

Evaluate ResourceFunction["MaTeXInstall"][] to install or upgrade MaTeX.

E. Chan-López
  • 23,117
  • 3
  • 21
  • 44