Show
Ignore:
Timestamp:
08/06/09 11:41:31 (3 years ago)
Author:
apdavison
Message:

Small fix due to a change in more recent versions of matplotlib

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/visualization/__init__.py

    r384 r416  
    5151                plot(*obj.next_frame(), **obj.kwargs) 
    5252                if obj.plot_function == "imshow" and i==0: 
    53                     l,b,w,h = panel.get_position() 
     53                    pos = panel.get_position() 
     54                    try: 
     55                        l,b,w,h = pos # older versions of Matplotlib 
     56                    except TypeError: 
     57                        l,b,w,h = pos.bounds # newer versions return a Bbox object 
    5458                    cb_panel = self.fig.add_axes([l+w, b, 0.05*w, h]) 
    5559                    self.fig.colorbar(panel.images[0], cb_panel)