Juan Wu
2015-05-16 15:50:40 UTC
Hi, List experts,
I have a matplotlib problem when I tried to use a tool called HDDM. As
HDDM is another issue, I here just post my problem with Matplotlib. In
short, the error alarm appeard when I input fig = plt.figure(). I am a
beginner with those stuff.
I would appreciate if anyone can give me any good pointers.
Thanks so much,
Juan
==================
In [8]: fig = plt.figure()
<matplotlib.figure.Figure at 0x13293890>
In [9]: ax = fig.add_subplot(111, xlabel='RT', ylabel='count',
title='RT distributions')
In [10]: for i, subj_data in data.groupby('subj_idx'):
...: subj_data.rt.hist(bins=20, histtype='step', ax=ax)
...: plt.savefig('hddm_demo_fig_00.pdf')
<matplotlib.figure.Figure at 0x1354cb70>
Traceback (most recent call last):
File "<ipython-input-15-3b0b3c83094c>", line 2, in <module>
subj_data.rt.hist(bins=20, histtype='step', ax=ax)
File "C:\Anaconda\lib\site-packages\pandas\tools\plotting.py", line
2830, in hist_series
raise AssertionError('passed axis not bound to passed figure')
AssertionError: passed axis not bound to passed figure
(relevant link: https://groups.google.com/forum/#!topic/hddm-users/yBeIRJaHGwo
there very few experts view and reply questions)
I have a matplotlib problem when I tried to use a tool called HDDM. As
HDDM is another issue, I here just post my problem with Matplotlib. In
short, the error alarm appeard when I input fig = plt.figure(). I am a
beginner with those stuff.
I would appreciate if anyone can give me any good pointers.
Thanks so much,
Juan
==================
In [8]: fig = plt.figure()
<matplotlib.figure.Figure at 0x13293890>
In [9]: ax = fig.add_subplot(111, xlabel='RT', ylabel='count',
title='RT distributions')
In [10]: for i, subj_data in data.groupby('subj_idx'):
...: subj_data.rt.hist(bins=20, histtype='step', ax=ax)
...: plt.savefig('hddm_demo_fig_00.pdf')
<matplotlib.figure.Figure at 0x1354cb70>
Traceback (most recent call last):
File "<ipython-input-15-3b0b3c83094c>", line 2, in <module>
subj_data.rt.hist(bins=20, histtype='step', ax=ax)
File "C:\Anaconda\lib\site-packages\pandas\tools\plotting.py", line
2830, in hist_series
raise AssertionError('passed axis not bound to passed figure')
AssertionError: passed axis not bound to passed figure
(relevant link: https://groups.google.com/forum/#!topic/hddm-users/yBeIRJaHGwo
there very few experts view and reply questions)