cll35 / mplh5canvas

Automatically exported from code.google.com/p/mplh5canvas
0 stars 0 forks source link

imshow_plot.py fails #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The imshow_plot.py fails when run:

valinor:examples tom$ python imshow_plot.py 
/Users/tom/Library/Python/2.6/site-packages/mplh5canvas-trunk-py2.6.egg/mplh5can
vas/handshake/handshake.py:41: DeprecationWarning: the md5 module is 
deprecated; use hashlib instead
  from md5 import md5
Web server active. Browse to http://131.142.156.6:8080 to view plots.
Traceback (most recent call last):
  File "imshow_plot.py", line 17, in <module>
    show(block=False)
  File "/Users/tom/Library/Python/2.6/site-packages/mplh5canvas-trunk-py2.6.egg/mplh5canvas/backend_h5canvas.py", line 518, in show
    Gcf.get_active().canvas.draw()
  File "/Users/tom/Library/Python/2.6/site-packages/mplh5canvas-trunk-py2.6.egg/mplh5canvas/backend_h5canvas.py", line 727, in draw
    self.figure.draw(renderer)
  File "/Users/tom/Library/Python/2.6/site-packages/matplotlib/artist.py", line 55, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/Users/tom/Library/Python/2.6/site-packages/matplotlib/figure.py", line 798, in draw
    func(*args)
  File "/Users/tom/Library/Python/2.6/site-packages/matplotlib/artist.py", line 55, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/Users/tom/Library/Python/2.6/site-packages/matplotlib/axes.py", line 1934, in draw
    a.draw(renderer)
  File "/Users/tom/Library/Python/2.6/site-packages/matplotlib/artist.py", line 55, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/Users/tom/Library/Python/2.6/site-packages/matplotlib/image.py", line 352, in draw
    renderer.draw_image(gc, l, b, im)
  File "/Users/tom/Library/Python/2.6/site-packages/mplh5canvas-trunk-py2.6.egg/mplh5canvas/backend_h5canvas.py", line 362, in draw_image
    h,w = im.get_size_out()
AttributeError: 'numpy.float64' object has no attribute 'get_size_out'

I am using mplh5canvas svn r10, matplotlib svn r8544, and numpy svn r8480

Original issue reported on code.google.com by thomas.r...@gmail.com on 14 Jul 2010 at 8:52

GoogleCodeExporter commented 9 years ago
In the file backend_h5canvas.py, change line 359 from 

def draw_image(self, x, y, im, bbox, clippath=None, clippath_trans=None):

to

def draw_image(self, gc, x, y, im, clippath=None, clippath_trans=None):

Original comment by Brian.Re...@gmail.com on 20 Jul 2010 at 6:30

GoogleCodeExporter commented 9 years ago
Fixed in r18.

Original comment by ludwig.s...@gmail.com on 27 May 2011 at 8:36

GoogleCodeExporter commented 9 years ago

Original comment by ludwig.s...@gmail.com on 27 May 2011 at 8:59