rcParam for 3D pane color#
The rcParams rcParams["axes3d.xaxis.panecolor"]
(default: (0.95, 0.95, 0.95, 0.5)
), rcParams["axes3d.yaxis.panecolor"]
(default: (0.9, 0.9, 0.9, 0.5)
),
rcParams["axes3d.zaxis.panecolor"]
(default: (0.925, 0.925, 0.925, 0.5)
) can be used to change the color of the background
panes in 3D plots. Note that it is often beneficial to give them slightly
different shades to obtain a "3D effect" and to make them slightly transparent
(alpha < 1).
import matplotlib.pyplot as plt
with plt.rc_context({'axes3d.xaxis.panecolor': (0.9, 0.0, 0.0, 0.5),
'axes3d.yaxis.panecolor': (0.7, 0.0, 0.0, 0.5),
'axes3d.zaxis.panecolor': (0.8, 0.0, 0.0, 0.5)}):
fig = plt.figure()
fig.add_subplot(projection='3d')
(Source code
, png
)
