I am making a scatter plot in matplotlib and need to change the background of the actual plot to black. I know how to change the face color of the plot using:
fig = plt.figure()
fig.patch.set_facecolor('xkcd:mint green')
My issue is that this changes the color of the space around the plot. How to I change the actual background color of the plot?



ax.patch.set_facecolor('black')(whereaxis the axes instance).fig.patchis the figure background andax.patchis the axes background. - Joe Kington