I tried using the rotation argument, but the labels still aren't vertical
fig, ax = plt.subplots(subplot_kw={"projection": "3d"})
# Plot the surface.
surf = ax.plot_surface(X, Y, Z, cmap=cm.coolwarm, linewidth=0, antialiased=True)
ax.set_xlabel(r"$\frac{k_z\mu}{\omega_p}$",rotation=0, fontsize=20,labelpad=15)
ax.set_ylabel(r"$\frac{k_\perp\mu}{\omega_p}$",rotation=0, fontsize=20,labelpad=15)
ax.set_zlabel(r"$\frac{\omega_i}{\omega_p}$",rotation=0, fontsize=20,labelpad=15)
plt.show()
And here is the output