Using pylab interface with Agg backend?

Hi guys, Is this possible? Specifically I'm trying

    > implement something close to this example:

    > But would like to be able to utilize code found in
    > samples like this:

You just have to tell matplotlib to use Agg as your backend -- pylab
will respect the default backend, whether it is a GUI, Agg or PS.

There are several ways to choose the backend

  * make it permanent by setting your backend to 'Agg' in matplotlibrc

  * change it on a per script basis exterally by launching with the -d

     > python -dAgg
     > python -dPS
     > python -dGTKAgg

  * probably best for a web app, use the matplotlib "use directive".
    This must be done *before* importing pylab

    import matplotlib
    import pylab
    plot and save....

This is discussed at


So my only remaining point of confusion is why wasn't the pylab
interface used in the demo here:


Is it just a style choice?