contour plot for newbie

Hi to all,

I'm trying to make a contour plot from the beginning, I mean from a
3 column data file X,Y,Z, but I don't know how to do it without, e.g., origin
and I want to use and to learn better matplotlib.
what's the first thing to do?

I imagine something like gridding data, but I've done a lot of attempts
obtaining just a lot of error output.
which is the way to grid with matplolib?

after the grid, I have to use the contour(Z). In each case I've tried, also
with the example of the matplotlib, It complains about some missing libraries
of numpy (numpy.ma): I tried to install from scratch...

I surfed the net, I
found something but I'm a newbie both in matplolib and in python, so I'd be
very happy if someone of you could help me from the beginning.

Thanks a lot in
advance
Francesco

p.s.
my O.S.
cat /etc/lsb-release
DISTRIB_ID=Ubuntu

DISTRIB_RELEASE=8.04
DISTRIB_CODENAME=hardy
DISTRIB_DESCRIPTION="Ubuntu 8.04.3
LTS"

python -V
Python 2.5.2