I just upgraded to IPython Notebook version 3.0 and it's disabling the formatting for seaborn. Here's some sample code that replicates the problem
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
data = np.random.randn(100)
fig,ax = plt.subplots(figsize = (11,8.5))
ax.plot(data)
This code works just fine in IPython Notebook V2.4.1 (see http://nbviewer.ipython.org/gist/anonymous/71733c24a68ee464ca40), but in IPython Notebook v3.0, the axes become invisible (see http://nbviewer.ipython.org/gist/anonymous/7525146b07709206908c).
Strangely, in V3, when I switch the order of the seaborn import and the matplotlib inline magic, the plot renders normally the first time I run, then if I re-run, the axes and gridlines disappear. So it seems to have something to do with the inline magic disabling seaborn properties.
Any workarounds, other than not re-executing my imports after the first time?
In iPython Notebook 3.0, add:
seaborn.set_style('darkgrid')
to restore Seaborn default color schemes.
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