Hist fillstyle error

220 views
Skip to first unread message

revkarol

unread,
Oct 7, 2013, 11:11:47 AM10/7/13
to rootpy...@googlegroups.com
Hi,

I've a histogram of type Hist which I try to set the fill style.

noiseon.fillstyle= 'solid'

which gives me the following error.  Anybody else have this problem?


  File "./plot_hvonoff_noise.py", line 44, in <module>
    r2m.hist(stack, stacked=False) # label='Assembly', histtype='step')
  File "/usr/local/lib/python2.7/dist-packages/rootpy-dev-py2.7.egg/rootpy/plotting/root2matplotlib.py", line 242, in hist
    returns.append(_hist(h, axes=axes, logy=logy, **kwargs))
  File "/usr/local/lib/python2.7/dist-packages/rootpy-dev-py2.7.egg/rootpy/plotting/root2matplotlib.py", line 275, in _hist
    zorder=zorder)
  File "/usr/local/lib/python2.7/dist-packages/rootpy-dev-py2.7.egg/rootpy/plotting/root2matplotlib.py", line 685, in fill_between
    return axes.fill_between(x, top, bottom, **kwargs)
  File "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 6555, in fill_between
    collection = mcoll.PolyCollection(polys, **kwargs)
  File "/usr/lib/pymodules/python2.7/matplotlib/collections.py", line 637, in __init__
    Collection.__init__(self,**kwargs)
  File "/usr/lib/pymodules/python2.7/matplotlib/collections.py", line 112, in __init__
    self.update(kwargs)
  File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 659, in update
    raise AttributeError('Unknown property %s'%k)

Karol.

Noel Dawe

unread,
Oct 8, 2013, 9:09:34 AM10/8/13
to
Hi Karol,

What matplotlib version are you using and what is the actual exception message (the value of "Unknown property %s'%k")?

Noel

revkarol

unread,
Oct 8, 2013, 12:39:15 PM10/8/13
to rootpy...@googlegroups.com
Hi Noel,

The unknown property was 'hatch'.  I had version 1.1.1 of matplotlib.  I upgraded to 1.3.0 and all seems to be well.  Should have thought of that myself.

Thanks,
Karol.

Noel Dawe

unread,
Oct 8, 2013, 6:40:36 PM10/8/13
to rootpy...@googlegroups.com
Hi Karol,

No problem! Glad to see it's fixed in 1.3.0. I had a similar problem recently where matplotlib had not been updated on one of my computers in a while and the plots were not displaying correctly. matplotlib is changing rapidly so it's hard to maintain support for older releases while taking advantage of the new features where some of the new features are actually required to get the desired results in rootpy's root2matplotlib. I think we will continue to recommend the latest matplotlib release if possible.

Cheers,
Noel

Reply all
Reply to author
Forward
0 new messages