Issue
I am using Seaborn to plot some data in Pandas.
I am making some very large plots (factorplot
s).
To see them, I am using some visualisation facilities at my university. I am using a Compound screen made up of 4 by 4 monitors with small (but nonzero) bevel -- the gap between the screens. This gap is black. To minimise the disconnect between the screen i want the graph backgound to be black. I have been digging around the documentation and playing around and I can't work it out.. Surely this is simple.
I can get grey background using set_style('darkgrid')
do i need to access the plot in matplotlib directly?
Solution
seaborn.set
takes an rc
argument that accepts a dictionary of valid matplotlib rcparams
. So we need to set two things: the axes.facecolor
, which is the color of the area where the data are drawn, and the figure.facecolor
, which is the everything a part of the figure outside of the axes
object.
(edited with advice from @mwaskom)
So if you do:
%matplotlib inline
import matplotlib.pyplot as plt
import seaborn
seaborn.set(rc={'axes.facecolor':'cornflowerblue', 'figure.facecolor':'cornflowerblue'})
fig, ax = plt.subplots()
You get:
And that'll work with your FacetGrid
as well.
Answered By - Paul H
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.