2
我想提出一个阴谋使用matplotlib.pyplot导入为PL:matplotlib绘制等高线标签AxesSubplot外.EPS文件
FIG = PL.figure(figsize=(12,8), dpi=150)
AX = FIG.add_subplot(111, aspect='equal', xlim=(lonMin,lonMax), ylim=(latMin,latMax))
PL.contourf(lon, lat, swath, range(2,56,1))
PL.colorbar(shrink=0.8, extend='both', ticks=range(5,55,5))
CNTR = PL.contour(lon, lat, rain, colors='black', linewidths=1)
PL.clabel(CNTR, fmt='%2i', inline_spacing=2)
PL.savefig('swaths_ao.png', bbox_inches='tight')
PL.savefig('swaths_ao.eps', bbox_inches='tight')
PL.savefig('swaths_ao.pdf', bbox_inches='tight')
PL.clf()
,我有是PL.clabel绘制的等高线标签甚至超出限制的问题AX,即,在图7的空白区域中。这只发生在.eps文件中,但不是.png或.pdf。巧合的是,我需要.eps。
任何提示如何补救?
是否有一个特殊的理由将'pyplot导入为PL'?为什么不是传统的'plt'。坦率地说,它看起来很奇怪。 'FIG'一样。 – joaquin
没有真正的原因,真的。 – milancurcic
您可以在[PEP-8](http://www.python.org/dev/peps/pep-0008/ – joaquin