1

Here it was mentioned how to set the background color of a plot to mint green using:

fig = plt.figure()
fig.patch.set_facecolor('xkcd:mint green')

enter image description here

I wonder how to do set that as default. I can use the following command to set the color for all figures in a particular notebook:

plt.rcParams['figure.facecolor'] = 'white'

When I run this inside a jupyter notebook it works. All images have no transparent, but white background. Though, when I add this to my matplotlibrc file nothing happens:

figure.facecolor : green
patch.facecolor : blue

I am sure the rc file is loaded. When I start the notebook, I use the following commands to produce a figure:

%pylab inline
plot(range(10))

What am I missing? Why has the parameter in the rc file no effect?

Soerendip
  • 7,684
  • 15
  • 61
  • 128

0 Answers0