(from phil:)
.... stuff deleted ......
Phil, Jeff,
Yes, the present colorbar is designed for use with images, not with
contourf, and fixing it (or making a new one) is something I have wanted
to do for quite a while. I just haven't gotten to it yet. Prompted by
your two emails, maybe I can at least take a close look during the next
week to see what it would take. It might be easy--probably is. No
promises yet, though.
Eric
Thanks Eric,
I also believe it should be easy to do. But it is better done by
somebody more familiar with matplotlib and python than I. I have
written such codes for other languages but need more practice before
I could do it elegantly in python.
As long as you are digging around in there, can I have you think about
another couple features?
1) The best colorbars in my mind have "triangles" at the endpoints
that indicate the color for the region higher than the highest
contour, and lower than the lowest contours. This allows one to label
only the meaningful boundaries and not specify how much above or below
those regions.
2) I frequently need to set contour intervals (the filled region
boundaries) to be approximately logarithmic. But I dont want to have
these filled regions occupy a fraction of the colorbar proportional to
their fraction of the total interval. I want each region to be equal
area on the colorbar.
An example of these features can be seen in the attached PNG figure
that I created in Yorick with a colorbar code I wrote. I havent tried
for beauty, but these figure are OK for for working plots. You can see
the point for the unequal contour intervals in the difference plot at
the bottom.
For the codes I wrote this necessitated supplying arguments to the
colorbar function like....
colorbar(levs, colors)
where levels was an N element array, and colors was an N+1 element
list containing color info for each filled region.
Thanks for listening.
Phil
···
On Mon, Aug 22, 2005 at 12:55:16PM -1000, Eric Firing wrote: