examples/pylab_examples/contour_demo.py fails #1102

mdboom opened this Issue Aug 17, 2012 · 2 comments


None yet

2 participants

Matplotlib Developers member

git bisect suggests it's this revision after which it was broken:


Assigning @efiring because it might be obvious to him, but if not, I'm happy to take a further look.

Traceback (most recent call last):
  File "contour_demo.py", line 101, in <module>
  File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/pyplot.py", line 3344, in flag
  File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/cm.py", line 285, in set_cmap
  File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/contour.py", line 984, in changed
  File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/cm.py", line 336, in changed
    self.callbacksSM.process('changed', self)
  File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/cbook.py", line 312, in process
    proxy(*args, **kwargs)
  File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/cbook.py", line 239, in __call__
    return mtd(*args, **kwargs)
  File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/colorbar.py", line 849, in on_mappable_changed
  File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/colorbar.py", line 884, in update_normal
  File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/colorbar.py", line 872, in add_lines
  File "/home/mdboom/python/lib/python2.7/site-packages/matplotlib/colorbar.py", line 498, in add_lines
    for lc in self.lines.pop():
TypeError: 'LineCollection' object is not iterable
@efiring efiring was assigned Aug 17, 2012
Matplotlib Developers member

Strange. I was sure I tested that whole pull request with this demo--but apparently not. I'll have to sort it out. I think I see roughly where the problem is coming from--a change from a LineCollection to a list of LineCollections, which is not being taken into account everywhere.

Matplotlib Developers member

I see it--a silly bug. Fix will be available shortly.

@efiring efiring closed this in 315573f Aug 17, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment