crash with http://matplotlib.org/examples/animation/rain.html

I get this error. I have previously got the error “‘PathCollection’ object has no attribute ‘set_sizes’” with other code, even though it is documented at

http://matplotlib.org/1.4.3/api/collections_api.html?highlight=set_color#matplotlib.collections.PathCollection.set_sizes
.

Keith

kbriggs:~/python> python3 rain.py
Traceback (most recent call last):
File “rain.py”, line 65, in
animation = FuncAnimation(fig, update, interval=10)
File “/usr/lib/python3/dist-packages/matplotlib/animation.py”, line 1011, in init
TimedAnimation.init(self, fig, **kwargs)
File “/usr/lib/python3/dist-packages/matplotlib/animation.py”, line 865, in init
*args, **kwargs)
File “/usr/lib/python3/dist-packages/matplotlib/animation.py”, line 546, in init
self._init_draw()
File “/usr/lib/python3/dist-packages/matplotlib/animation.py”, line 1036, in _init_draw
self._draw_frame(next(self.new_frame_seq()))
File “/usr/lib/python3/dist-packages/matplotlib/animation.py”, line 1050, in _draw_frame
self._drawn_artists = self._func(framedata, *self._args)
File “rain.py”, line 59, in update
scat.set_sizes(rain_drops[‘size’])
AttributeError: ‘PathCollection’ object has no attribute ‘set_sizes’

Which version of matplotlib are you using. The set_sizes() feature was added for v1.4, I think.

···

On Thu, Jun 25, 2015 at 11:16 AM, <keith.briggs@…1048…> wrote:

I get this error. I have previously got the error “‘PathCollection’ object has no attribute ‘set_sizes’” with other code, even though it is documented at

http://matplotlib.org/1.4.3/api/collections_api.html?highlight=set_color#matplotlib.collections.PathCollection.set_sizes
.

Keith

kbriggs:~/python> python3 rain.py
Traceback (most recent call last):
File “rain.py”, line 65, in
animation = FuncAnimation(fig, update, interval=10)
File “/usr/lib/python3/dist-packages/matplotlib/animation.py”, line 1011, in init
TimedAnimation.init(self, fig, **kwargs)
File “/usr/lib/python3/dist-packages/matplotlib/animation.py”, line 865, in init
*args, **kwargs)
File “/usr/lib/python3/dist-packages/matplotlib/animation.py”, line 546, in init
self._init_draw()
File “/usr/lib/python3/dist-packages/matplotlib/animation.py”, line 1036, in _init_draw
self._draw_frame(next(self.new_frame_seq()))
File “/usr/lib/python3/dist-packages/matplotlib/animation.py”, line 1050, in _draw_frame
self._drawn_artists = self._func(framedata, *self._args)
File “rain.py”, line 59, in update
scat.set_sizes(rain_drops[‘size’])
AttributeError: ‘PathCollection’ object has no attribute ‘set_sizes’


Monitor 25 network devices or servers for free with OpManager!

OpManager is web-based network management software that monitors

network devices and physical & virtual servers, alerts via email & sms

for fault. Monitor 25 devices for free with no restriction. Download now

http://ad.doubleclick.net/ddm/clk/292181274;119417398;o


Matplotlib-devel mailing list

Matplotlib-devel@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Yes, the size related functions in collections were added in the 1.4 series.

See http://matplotlib.org/users/whats_new.html#added-size-related-functions-to-specialized-collections

Tom

···

On Thu, Jun 25, 2015 at 11:16 AM, <keith.briggs@…1048…> wrote:

I get this error. I have previously got the error “‘PathCollection’ object has no attribute ‘set_sizes’” with other code, even though it is documented at

http://matplotlib.org/1.4.3/api/collections_api.html?highlight=set_color#matplotlib.collections.PathCollection.set_sizes
.

Keith

kbriggs:~/python> python3 rain.py
Traceback (most recent call last):
File “rain.py”, line 65, in
animation = FuncAnimation(fig, update, interval=10)
File “/usr/lib/python3/dist-packages/matplotlib/animation.py”, line 1011, in init
TimedAnimation.init(self, fig, **kwargs)
File “/usr/lib/python3/dist-packages/matplotlib/animation.py”, line 865, in init
*args, **kwargs)
File “/usr/lib/python3/dist-packages/matplotlib/animation.py”, line 546, in init
self._init_draw()
File “/usr/lib/python3/dist-packages/matplotlib/animation.py”, line 1036, in _init_draw
self._draw_frame(next(self.new_frame_seq()))
File “/usr/lib/python3/dist-packages/matplotlib/animation.py”, line 1050, in _draw_frame
self._drawn_artists = self._func(framedata, *self._args)
File “rain.py”, line 59, in update
scat.set_sizes(rain_drops[‘size’])
AttributeError: ‘PathCollection’ object has no attribute ‘set_sizes’


Monitor 25 network devices or servers for free with OpManager!

OpManager is web-based network management software that monitors

network devices and physical & virtual servers, alerts via email & sms

for fault. Monitor 25 devices for free with no restriction. Download now

http://ad.doubleclick.net/ddm/clk/292181274;119417398;o


Matplotlib-devel mailing list

Matplotlib-devel@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-devel