Hello,
taken form the tutorial http://matplotlib.sourceforge.net/leftwich_tut.txt I
use the code:
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure
fig = Figure()
canvas = FigureCanvas(fig)
ax = fig.add_subplot(111)
ax.plot([1,2,3])
ax.set_title('hi mom')
ax.grid(True)
ax.set_xlabel('time')
ax.set_ylabel('volts')
canvas.print_figure('test')
Which IMO uses the AGG backend (which works fine for my using the pylab
interface).
But upon excecution I get:
No module named pygtk
PyGTK version 1.99.16 or greater is required to run the GTK Matplotlib
backends
What is wrong there?
Thx,
Florian
Sorry if this is otiose but:
do you have pygtk?
http://www.pygtk.org/
Cheers,
Alan Isaac
···
On Fri, 13 May 2005, Florian Lindner apparently wrote:
No module named pygtk
PyGTK version 1.99.16 or greater is required to run the GTK Matplotlib
backends
What is wrong there?
No, and I don't want it. I want to use the AGG backend for generating
graphics.
Florian
···
Am Freitag, 13. Mai 2005 18:41 schrieb Alan G Isaac:
On Fri, 13 May 2005, Florian Lindner apparently wrote:
> No module named pygtk
> PyGTK version 1.99.16 or greater is required to run the GTK Matplotlib
> backends
> What is wrong there?
Sorry if this is otiose but:
do you have pygtk?
http://www.pygtk.org/
Florian Lindner wrote:
Hello,
taken form the tutorial http://matplotlib.sourceforge.net/leftwich_tut.txt I use the code:
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure
fig = Figure()
canvas = FigureCanvas(fig)
ax = fig.add_subplot(111)
ax.plot([1,2,3])
ax.set_title('hi mom')
ax.grid(True)
ax.set_xlabel('time')
ax.set_ylabel('volts')
canvas.print_figure('test')
Which IMO uses the AGG backend (which works fine for my using the pylab interface).
But upon excecution I get:
No module named pygtk
PyGTK version 1.99.16 or greater is required to run the GTK Matplotlib backends
while this shouldn't be necessary for this script, you might try:
import matplotlib
matplotlib.use("AGG") # I may have that string wrong.
before any of the other imports.
-Chris
···
--
Christopher Barker, Ph.D.
Oceanographer
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
Chris.Barker@...259...