histogram creation tidbits

I'm not exactly sure why this is true, but I've empirically

    > found this out to be the case. If anyone knows why, I'd
    > sure love to know.

matplotlib will work with numpy, numarray *or* Numeric, but it doesn't
work with all three at the same time. You need to set your "numerix"
setting in your config file to agree with which package you are using
(and then restart python). An example rc file is at

We provide a numerix compatibility layer which you can consider using
so you won't get into these troubles. This essentially guarantees
that the array object you are using is the same as the one you have
set in your configuration file

  import matplotlib.numerix as nx

You can inspect the value of the numerix parameter with

  import matplotlib
  print matplotlib.rcParams['numerix']

rcParams is a dictionary mapping a configuration parameter to a
value. Most of these can be changed dynamically at runtime, but two,
the 'numerix' and the 'backend' setting must be changed before
importing the numerix module and pylab, respectively, because these
trigger imports that are not easily undone. Most people just set
these once in their rc file and are done with it, but you can set them
in a script with

  from matplotlib import rcParams
  rcParams['numerix] = 'numpy'
  rcParams['backend'] = 'PS'

  # it is now safe to import numerix and pylab
  import matplotlib.numerix as nx # you'll be using numpy
  import pylab # with the postscript backend as default