3

When making a subplot we use facecolor argument to set the color of the background. For example

import matplotlib.pyplot as plt

fig, ax = plt.subplots(facecolor="black")
ax.set_facecolor("black")

This produces the following output: enter image description here

Now the above output is a plain black color. What I want is to add an effect to this plain black color so that it will look like this:

enter image description here

If you observe closely there is a bit of white color scattered over the black colored background. How to produce this effect in matplotlib?

slothfulwave612
  • 1,349
  • 9
  • 22

1 Answers1

3

I believe that only solid colours can be set. You could create the desired effect in a different program and save it as an image. Then, set the background of the plot to that image as in this SO answer.

mullinscr
  • 1,668
  • 1
  • 6
  • 14