擅长:python、mysql、java
<p>试试这个:</p>
<p>确定如何使用像素到英寸转换器(如<a href="http://osdir.com/ml/python.matplotlib.general/2004-07/msg00038.html" rel="nofollow">following matplotlib documentation</a>)设置<code>width</code>和<code>height</code>。然后尝试:</p>
<pre><code>import matplotlib.pyplot as plt
fig = plt.figure(frameon=False)
fig.set_size_inches(width,height)
</code></pre>