擅长:python、mysql、java
<p>这就是我使用的,利用matplotlib提供的上下文管理:</p>
<pre><code>import matplotlib
class Stylish(matplotlib.rc_context):
def __init__(self, **kwargs):
matplotlib.rc_context.__init__(self)
sns.set(**kwargs)
</code></pre>
<p>例如:</p>
<pre><code>with Stylish(font_scale=2):
sns.kdeplot(x, shade=True)
</code></pre>