There has been some recent discussion about perhaps improving the OO interface. So Here's a question:
How do I save an AGG figure with the OO interface?
>>> fig = pylab.figure()
>>> ax = fig.add_subplot(1,1,1)
>>> ax.plot(range(10), pylab.sin(range(10)))
Now how do I save it as a PNG? I can do:
But then that is the interface I'm trying to get away from.
Looking at the docs, it looks like the agg back-end should have:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
AttributeError: Figure instance has no attribute 'print_figure'
But no such luck.
Another option would be:
But that's not there either.
Christopher Barker, Ph.D.
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception