No: from matplotlib.backends.backend_gtkagg import
> FigureCanvasGTK as FigureCanvas
> Yes: from matplotlib.backends.backend_gtkagg import
> FigureCanvasGTKAgg as FigureCanvas
To which I should add a bit of clarification.
import os, gtk
from matplotlib.backends.backend_gtkagg import FigureCanvasGTK as FigureCanvas
from matplotlib.figure import Figure
The problem (aside from the fact that you need and not
FigureCanvasGTK) is that the 'use' directive is a pylab only
construct. It is used by the override the rc file backend setting
that the pylab module normally reads. It is irrelevant to the API
(and hence was ignored), where you can use an many different types of
FigureCanvases as make sense in your environment. Ie, there is no
concept of a default or current backend in the API, and the canvases
you import and create are the ones that will be used.