I am using Jupyter Lab to plot some data using pandas plotting like this:
df.plot()
The trouble is that while the plot area is colored white, the axis labels are in black which is very difficult to see with a dark jupyter lab theme. Is there a way to make the entire plot background white so that I can see the labels. I have put an example image below.
You can set a different style for matplotlib
to use, which should override the default color choices. pandas
uses matplotlib
as its plotting library. You can see the available options on the documentation page or via:
from matplotlib import style
style.available
# returns:
['bmh',
'classic',
'dark_background',
'fast',
'fivethirtyeight',
'ggplot',
'grayscale',
'seaborn-bright',
'seaborn-colorblind',
'seaborn-dark-palette',
'seaborn-dark',
'seaborn-darkgrid',
'seaborn-deep',
'seaborn-muted',
'seaborn-notebook',
'seaborn-paper',
'seaborn-pastel',
'seaborn-poster',
'seaborn-talk',
'seaborn-ticks',
'seaborn-white',
'seaborn-whitegrid',
'seaborn',
'Solarize_Light2',
'_classic_test']
Since you are using a dark themed notebook, try a dark themed plot:
style.use('dark_background')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With