I am creating a 2 dimensional histogram that I would like to plot as
a contourf plot with
matplotlib. I am using numpy to generate the histogram, but when I
plot it the tick marks
are of course the index of the histogram array. How do I change these
tick labels to
the value of the bins used
One more datapoint--I am becoming suspicious that this could be an arch
problem. A colleague was able to build from source under cygwin on his
rather old laptop. However, another colleague and myself have rather new
computers and both failed (with different errors in the verbose mode). I
just
Tommy,
The easiest way is probably to provide contourf with x and y arguments
corresponding to the bin centers. The x vector would have an entry for
each column in your Z(x,y), and the y vector an entry for each row.
In [1]:z = rand(10,20)
In [2]:x = 2*arange(20)
In [3]:y = 2*arange(10)