I just updated matplotlib to 1.1 and want try the new featuresSankey
Diagrams
and
Animation
but when I try the api example code: sankey_demo_basics.py
I got the error messages as below:
==============================================================================
Traceback (most recent call last):
File
"/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py",
line 55, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File
"/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/figure.py",
line 884, in draw
func(*args)
File
"/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py",
line 55, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File
"/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/axes.py",
line 1983, in draw
a.draw(renderer)
File
"/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py",
line 55, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File
"/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/patches.py",
line 385, in draw
gc.set_linewidth(lw)
TypeError: a float is required
Traceback (most recent call last):
File
"/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py",
line 55, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File
"/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/figure.py",
line 884, in draw
func(*args)
File
"/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py",
line 55, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File
"/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/axes.py",
line 1983, in draw
a.draw(renderer)
File
"/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py",
line 55, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File
"/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/patches.py",
line 385, in draw
gc.set_linewidth(lw)
TypeError: a float is required
==================================================================================
Then I looked into the
file
/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/patches.py
at the line 384 the code is: gc.set_linewidth(lw)
I added "lw = np.float(lw)" before "gc.set_linewidth(lw)", then the
example code runs successfully.
Any help?
Thanks for any reply.
--
Mingkui Li
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users