basemap compile problem

John Hunter wrote:

    > John: In the process of updating the proj4 source files to
    > version 4.5.0, I've somehow munged the repository. Could
    > you try revision 2836? If that works for you, I'll try to
    > revert the repository.

Yes, this works.

But now I am getting a traceback with basemap + mpl svn in contour
with the attached file. I don't know if this is a bug in the example
code or in the contour module (it appears tcolors is not getting set
because the changed method is not being called, but I only looked at
it briefly)

matplotlib/htdocs/screenshots> python
plotmap.py
/usr/lib/python2.4/site-packages/matplotlib/figure.py:690:
DeprecationWarning: Old colorbar kwargs (tickfmt) found; using
colorbar_classic.
  warnings.warn(msg, DeprecationWarning)
Traceback (most recent call last):
  File "plotmap.py", line 36, in ?
    colorbar(tickfmt='%d', cax=cax) # draw colorbar
  File "/usr/lib/python2.4/site-packages/matplotlib/pylab.py", line
  342, in colorbar
    ret = gcf().colorbar(mappable, cax = cax, **kw)
  File "/usr/lib/python2.4/site-packages/matplotlib/figure.py", line
  691, in colorbar
    self.colorbar_classic(mappable, cax, **kw)
  File "/usr/lib/python2.4/site-packages/matplotlib/figure.py", line
  825, in colorbar_classic
    CS = cax.contourf(*args, **kw)
  File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line
  4097, in contourf
    return ContourSet(self, *args, **kwargs)
  File "/usr/lib/python2.4/site-packages/matplotlib/contour.py", line
  456, in __init__
    for level, level_upper, color in zip(lowers, uppers,
    self.tcolors):
AttributeError: ContourSet instance has no attribute 'tcolors'

plotmap.py (2.07 KB)

John Hunter wrote:

    > John Hunter wrote:

    > John: In the process of updating the proj4 source files to
    > version 4.5.0, I've somehow munged the repository. Could
    > you try revision 2836? If that works for you, I'll try to
    > revert the repository.

Yes, this works.

But now I am getting a traceback with basemap + mpl svn in contour
with the attached file. I don't know if this is a bug in the example
code or in the contour module (it appears tcolors is not getting set
because the changed method is not being called, but I only looked at
it briefly)

matplotlib/htdocs/screenshots> python
plotmap.py
/usr/lib/python2.4/site-packages/matplotlib/figure.py:690:
DeprecationWarning: Old colorbar kwargs (tickfmt) found; using
colorbar_classic.
  warnings.warn(msg, DeprecationWarning)
Traceback (most recent call last):
  File "plotmap.py", line 36, in ?
    colorbar(tickfmt='%d', cax=cax) # draw colorbar
  File "/usr/lib/python2.4/site-packages/matplotlib/pylab.py", line
  342, in colorbar
    ret = gcf().colorbar(mappable, cax = cax, **kw)
  File "/usr/lib/python2.4/site-packages/matplotlib/figure.py", line
  691, in colorbar
    self.colorbar_classic(mappable, cax, **kw)
  File "/usr/lib/python2.4/site-packages/matplotlib/figure.py", line
  825, in colorbar_classic
    CS = cax.contourf(*args, **kw)
  File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line
  4097, in contourf
    return ContourSet(self, *args, **kwargs)
  File "/usr/lib/python2.4/site-packages/matplotlib/contour.py", line
  456, in __init__
    for level, level_upper, color in zip(lowers, uppers,
    self.tcolors):
AttributeError: ContourSet instance has no attribute 'tcolors'

John: If you take the 'tickfmt' argument out of the colorbar call, it works. Apparently, it's a problem with the deprecated colorbar_classic. Note that the updated plotmap.py example in the basemap examples directory doesn't use colorbar_classic, and works.

-Jeff

···

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...236...
325 Broadway Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg