擅长:python、mysql、java
<p>可以使用<code>seaborn.set()</code>方法更改字体比例,将<code>font_scale</code>参数设置为所需的比例,请参阅seaborn<a href="https://stanford.edu/~mwaskom/software/seaborn/generated/seaborn.set.html#seaborn.set" rel="noreferrer">documentation</a>中的更多内容。</p>
<p>例如,比例为3的绘图:</p>
<pre><code>import seaborn as sns
import matplotlib.pyplot as plt
from numpy import arange
# here set the scale by 3
sns.set(font_scale=3)
x = arange(25).reshape(5, 5)
cmap = sns.diverging_palette(220, 20, sep=20, as_cmap=True)
ax = sns.heatmap(x, cmap=cmap)
plt.show()
</code></pre>
<p><a href="https://i.stack.imgur.com/NDISC.png" rel="noreferrer"><img src="https://i.stack.imgur.com/NDISC.png" alt="plot with big font scale"/></a></p>