python seaborn to reset back to the matplotlib

I'm using seaborn version o.4 and matplotlib version 1.42 I have a chart displays both line and marker through simple plot command eg.

plt.plot([1,5,3,8,4],'-bo');

Due to a potential bug (https://github.com/mwaskom/seaborn/issues/344), after import seaborn, same code shows line only without marker.

import seaborn as sb 
plt.plot([1,5,3,8,4],'-bo');

So my question is: after import seaborn, Is there a way to reset all the parameters back to original?


Yes, call seaborn.reset_orig.


None of these solutions worked for me (Python 3.x, Jupyter). What worked was matplotlib.rc_file_defaults()

See the documentation here: https://matplotlib.org/stable/api/matplotlib_configuration_api.html#matplotlib.rc_file_defaults


To refresh Matplotlib's configuration side effects often encountered with Seaborn:

import matplotlib as mpl
import matplotlib.pyplot as plt
import seaborn as sns

Run this:

import importlib
importlib.reload(mpl); importlib.reload(plt); importlib.reload(sns)

For old Python2 code:

import imp
imp.reload(mpl); imp.reload(plt); imp.reload(sns)

Note: None of the following correctly restores the state of matplotlib:

  • sns.reset_orig()
  • sns.reset_defaults()
  • mpl.rcParams.update(mpl.rcParamsDefault)