matplotlib.pyplot.figure()
....
seaborn.despine(offset=10)
The despine
function of seaborn offsets the axis spines from the plot, which looks quite nice. The function needs to be called after the code that plots a figure. However, I would like this to be the default for any plot, at least any seaborn plot. How can this be configured?
Alternatively, how can this be made part of a plotting context?
Matplotlib added rc params to control spine visibility in version 1.5, so you could turn off the visibility of the top and right spines by default with
import matplotlib.pyplot as plt
plt.rc("axes.spines", top=False, right=False)
However, matplotlib does not expose spine offsets through the rc params, so there is no setting that will automatically apply those to every plot.
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