I have a custom matplotlibrc
file with matplotlib configuration options, following the procedure here. When I first start up Jupyter QtConsole (through the terminal, if that matters), the file is being read—plots use the options I've set, such as dashed grid lines:
%matplotlib inline
plt.plot([1, 2, 3])
Out[2]: [<matplotlib.lines.Line2D at 0x9d2fe80>]
The matplotlibrc
file is here:
mpl.matplotlib_fname()
Out[4]: 'C:\\Users\\my_username\\.matplotlib\\matplotlibrc'
But then if I import seaborn:
import seaborn as sns
plots then switch to seaborn style:
plt.plot([1, 2, 3])
Out[6]: [<matplotlib.lines.Line2D at 0xceb9cc0>]
Is it possible to retain the original plotting style while also importing seaborn? I'd like to use its capabilities, such as seaborn.heatmap
, but not its styles.