How/why creating *Figure object* changes defaults of plot?

I've notice that if I (1) create a plot vs. e.g.

    > plot([1,2,3])

    > (2) explicitly add a plot to a Figure object

    > e.g. fig = Figure() p = fig.add_subplot(111)
    > plot([1,2,3])

    > it looks DIFFERENT?!?

Not sure what your problem is: please post complete examples. But
it looks like you are improperly mixing pylab and the OO API. If you
want to use a minimal set of pylab and use OO matplotlib for every
thing else, I recommend

import matplotlib.numerix as nx
from pylab import figure, show, close

The first command lets pylab handle figure management, the most
complex part, and the second gives you access to the numpy namespace

Here is the equivalent of the canonical pylab :


using a more pythonic style:

  from pylab import figure, show, close
  fig = figure()
  ax = fig.add_subplot(111)

Note in your example:

  fig = Figure()
  p = fig.add_subplot(111)

You used fig.add_subplot to create an Axes, which you named "p", but
then did not use it. You would have wanted something like