Change 3D background to black in matplotlib
问题 I'm having trouble changing the background of my 3d graph to black. This is my current code. When I do set facecolor to black, it changes the inside of the graph to be grey, which is not what I want. fig = plt.figure() fig.set_size_inches(10,10) ax = plt.axes(projection='3d') ax.grid(False) ax.xaxis.pane.set_edgecolor('b') ax.yaxis.pane.set_edgecolor('b') ax.zaxis.pane.set_edgecolor('b') # plt.gca().patch.set_facecolor('white') # plt.axis('On') fig.patch.set_facecolor('black') ax.scatter(xs =