扩展了Matt的答案(值得称赞,但我认为答案可能不太复杂),这就是我最终解决它的方式。
(a)我在中查询了ipython的默认matplotlib设置
C:Python27Libsite-packagesIPythonzmqpylabbackend_inline.py(请参阅Matt的答案)。
(b)并
printmpl.rcParams['figure.figsize']通过在脚本中插入以下代码,用终端版本中设置的值覆盖它们(我使用等等来查找):
import matplotlib as mpl#To make sure we have always the same matplotlib settings#(the ones in comments are the ipython notebook settings)mpl.rcParams['figure.figsize']=(8.0,6.0) #(6.0,4.0)mpl.rcParams['font.size']=12 #10 mpl.rcParams['savefig.dpi']=100 #72 mpl.rcParams['figure.subplot.bottom']=.1 #.125



