Changeset 416

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

Location:
trunk/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/signals/spikes.py

    r415 r416  
    13081308            xaxis = xaxis[:-1] 
    13091309        else: 
    1310             values, xaxis = numpy.histogram(isis, bins=bins, normed=True) 
     1310            values, xaxis = numpy.histogram(isis, bins=bins, normed=True, new=True) 
    13111311        subplot       = get_display(display) 
    13121312        if not subplot or not HAVE_PYLAB: 
     
    14031403            xaxis = xaxis[:-1] 
    14041404        else: 
    1405             values, xaxis = numpy.histogram(cvs, bins=bins, normed=True) 
     1405            values, xaxis = numpy.histogram(cvs, bins=bins, normed=True, new=True) 
    14061406        subplot       = get_display(display) 
    14071407        if not subplot or not HAVE_PYLAB: 
  • 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)