fig = pylab.figure()
if full:
- axes = pylab.axes([0, 0, 1, 1])
+ axes = fig.add_axes([0, 0, 1, 1])
else:
- axes = pylab.axes()
+ axes = fig.add_subplot(1, 1, 1)
if title:
axes.set_title(title)
axes.set_axis_off()
if contours:
cset = axes.contour(X[:-1,:-1], Y[:-1,:-1], Z, contours, cmap=cmap)
# [:-1,:-1] to strip dummy last row & column from X&Y.
- pylab.clabel(cset, inline=1, fmt='%1.1f', fontsize=10)
+ axes.clabel(cset, inline=1, fmt='%1.1f', fontsize=10)
else:
# pcolor() is much slower than imshow.
#plot = axes.pcolor(X, Y, Z, cmap=cmap, edgecolors='none')
if options.output:
fig.savefig(options.output)
else:
- pylab.ion()
pylab.show()