Update
It might be worthwhile just specifying PlotPoints
. For instance, if we use
Energies[_, _, x_, y_] := SparseArray[
{Band[{1, 2}] -> Cos[x] Sin[y], Band[{2, 1}] -> Cos[x] Sin[y]}
, {3, 3}]
as our set of test-matrices, then
Plot3D[Evaluate @ Sort @ Eigenvalues @ Energies[W, q, x, y]
, {x, 0, 1}, {y, 0, 1}
, PlotPoints -> 10]
yields (much faster than generating the set of points, I might add):

Original post
Here's one way to go about this that directly generalizes your code.
data[W_, q_, {xmin_, xmax_, dx_}, {ymin_, ymax_, dy_}] := Transpose[
Flatten[
Table[
{x, y, #} & /@ Sort[Eigenvalues[Energies[W, q, x, y]]]
, {x, xmin, xmax, dx}
, {y, ymin, ymax, dy}]
, {1, 2}]
, {2, 1}]
The Flatten
is necessary in order to change the 2D list of one "sheet" of eigenvalues into a 1D list over all choices of x
and y
, and the Transpose
is necessary in order to make the output a list of the different "sheets" of eigenvalues. (By the way, if I've interpreted things correctly, you could have replaced Thread
with Transpose
in your code, although there doesn't seem to be any speed gain.)
To test this, we define 3 by 3 test matrices:
Energies[_, _, x_, y_] := RandomReal[{-x, y}, {3, 3}]
and call the function as
data1[W, q, {0, 1, 0.05}, {-3, 3, 0.1}]
This is the proper format for ListPlot3D
, so if we call
ListPlot3D[ data1[W, q, {0, 1, 0.05}, {-3, 3, 0.1}] ]
we get, for example, the following figure:

ListPlot3D
? It seems like you are making a table of the eigenvalues rather than plotting continuous functions. $\endgroup$