[Numpy-discussion] matplotlib

John Hunter jdhunter at ace.bsd.uchicago.edu
Mon Feb 13 07:34:05 CST 2006


>>>>> "Bill" == Bill Baxter <wbaxter at gmail.com> writes:

    Bill> from numpy import * was the only line missing, called before
    Bill> the rest.  It seems to work fine if I use from pylab import
    Bill> * instead of import pylab as g

    Bill> And actually if I do both in this order: import pylab as g
    Bill> from pylab import *

    Bill> Seems as if there's some
    Bill> initialization code that only gets run with the 'from pylab
    Bill> import *' version.

As far as I know that is a python impossibility, unless perhaps you do
some deep dark magic that is beyond my grasp.  pylab doesn't know how
it is imported.

Are you sure you have your numerix set properly?  I suggest creating
two free standing scripts, one with the problem and one without, and
running both with --verbose-helpful to make sure that your settings
are what you think they are.  If you verify that numerix is set
properly and still see the problem, I would like to see both scripts
in case it is exposing a problem with matplotlib.

Of course, doing multiple import * commands is a recipe for long term
pain, especially with packages that have so much overlapping namespace
and numpy/scipy/pylab.

JDH




More information about the Numpy-discussion mailing list