import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
x = np.linspace(-5, 5, 100)
y = np.linspace(-5, 5, 100)
z = np.sin(np.sqrt(x**2 + y**2))
ax = fig.add_subplot(111, projection='3d')
ax.plot_surface(x, y, z, cmap='viridis')
# Change grid background color to black
ax.xaxis.pane.set_edgecolor((0, 0, 0, 1))
ax.yaxis.pane.set_edgecolor((0, 0, 0, 1))
ax.zaxis.pane.set_edgecolor((0, 0, 0, 1))
# Set the pane colors to black with alpha = 1
ax.xaxis.set_pane_color((0, 0, 0, 1))
ax.yaxis.set_pane_color((0, 0, 0, 1))
ax.zaxis.set_pane_color((0, 0, 0, 1))
# Set the grid color to dark gray
ax.xaxis._axinfo['grid'].update(color='darkgray')
ax.yaxis._axinfo['grid'].update(color='darkgray')
ax.zaxis._axinfo['grid'].update(color='darkgray')