Re: [Matplotlib-users] plot problem
I noticed in your output that another figure seems to have been created (you see its output as ""). It would be useful to add some print statements to figure out exactly which line is emitting that. Second, you are calling "plt.savefig()" in the for-loop for the same filename. I suspect that isn't what you want. I am going to assume that you want to save a final figure after the for-loop is complete, right? Also, it would be more clear to use "fig.savefig()" instead of the more "magical" plt.savefig() as the latter would automatically create a figure if one didn't exist for some reason. Ben Root On Sat, May 16, 2015 at 11:57 AM, Thomas Caswell wrote: > This is coming out of the pandas plotting tools, you might get better > answers on their mailing list. > > Tom > > On Sat, May 16, 2015 at 11:51 AM Juan Wu wrote: > >> 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() >> >> >> 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') >> >> >> Traceback (most recent call last): >> >> File "", line 2, in >> 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) >> >> >> -- >> One dashboard for servers and applications across Physical-Virtual-Cloud >> Widest out-of-the-box monitoring support with 50+ applications >> Performance metrics, stats and reports that give you Actionable Insights >> Deep dive visibility with transaction tracing using APM Insight. >> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y >> ___ >> Matplotlib-users mailing list >> Matplotlib-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > > -- > One dashboard for servers and applications across Physical-Virtual-Cloud > Widest out-of-the-box monitoring support with 50+ applications > Performance metrics, stats and reports that give you Actionable Insights > Deep dive visibility with transaction tracing using APM Insight. > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plot problem
This is coming out of the pandas plotting tools, you might get better answers on their mailing list. Tom On Sat, May 16, 2015 at 11:51 AM Juan Wu wrote: > 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() > > > 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') > > > Traceback (most recent call last): > > File "", line 2, in > 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) > > > -- > One dashboard for servers and applications across Physical-Virtual-Cloud > Widest out-of-the-box monitoring support with 50+ applications > Performance metrics, stats and reports that give you Actionable Insights > Deep dive visibility with transaction tracing using APM Insight. > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] plot problem
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() 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') Traceback (most recent call last): File "", line 2, in 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) -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plot problem
Neal Becker wrote: > On Friday 16 January 2009, Eric Firing wrote: >> Neal Becker wrote: >>> pylab.plot (xaxis, log10 (the_sum)*10) >>> where xaxis is numpy array, and log10(the_sum)*10 is my own class that is >>> a valid python sequence (it is a c++ wrapper around boost::ublas), gives: >>> File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- >>> x86_64.egg/matplotlib/pyplot.py", line 2096, in plot >>> ret = gca().plot(*args, **kwargs) >>> File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- >>> x86_64.egg/matplotlib/axes.py", line 3277, in plot >>> for line in self._get_lines(*args, **kwargs): >>> File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- >>> x86_64.egg/matplotlib/axes.py", line 394, in _grab_next_args >>> for seg in self._plot_2_args(remaining, **kwargs): >>> File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- >>> x86_64.egg/matplotlib/axes.py", line 267, in _plot_2_args >>> if is_string_like(tup2[1]): >>> File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- >>> x86_64.egg/matplotlib/cbook.py", line 277, in is_string_like >>> try: obj + '' >>> RuntimeError: check:: failed >>> >>> If I convert the 2nd arg to array, it works: >>>pylab.plot (xaxis, np.array(log10 (the_sum)*10)) >>> >>> Doesn't plot support arbitrary sequences? >> Partial correction to my previous post: >> is_string_like looks for a TypeError or ValueError to be raised. I >> suppose we could look for any exception, since your object raises a >> RuntimeError. >> >> I wonder whether it would be equally effective and more robust if the >> test were >> >> try: '' + obj >> >> instead of the other way around. >> >> Eric > > IIRC, boost::python translates c++ exceptions to RuntimeError. If true, then > it's a lot easier to fix matplotlib than to fix boost::python wrappers. After poking around a little, I conclude that there is nothing gained by having is_string_like look for particular exceptions, so I will relax that, which should solve your problem with no negative consequences for anything else. I've committed the change to the 98.5 maintenance branch, but I'm having trouble with svnmerge, so I don't know how long it will take to get it into the trunk. Eric -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plot problem
Neal Becker wrote: > On Friday 16 January 2009, Eric Firing wrote: >> Neal Becker wrote: >>> pylab.plot (xaxis, log10 (the_sum)*10) >>> where xaxis is numpy array, and log10(the_sum)*10 is my own class that is >>> a valid python sequence (it is a c++ wrapper around boost::ublas), gives: >>> File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- >>> x86_64.egg/matplotlib/pyplot.py", line 2096, in plot >>> ret = gca().plot(*args, **kwargs) >>> File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- >>> x86_64.egg/matplotlib/axes.py", line 3277, in plot >>> for line in self._get_lines(*args, **kwargs): >>> File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- >>> x86_64.egg/matplotlib/axes.py", line 394, in _grab_next_args >>> for seg in self._plot_2_args(remaining, **kwargs): >>> File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- >>> x86_64.egg/matplotlib/axes.py", line 267, in _plot_2_args >>> if is_string_like(tup2[1]): >>> File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- >>> x86_64.egg/matplotlib/cbook.py", line 277, in is_string_like >>> try: obj + '' >>> RuntimeError: check:: failed >>> >>> If I convert the 2nd arg to array, it works: >>>pylab.plot (xaxis, np.array(log10 (the_sum)*10)) >>> >>> Doesn't plot support arbitrary sequences? >> Not *completely* arbitrary, evidently. It has to raise a Python >> exception when an invalid operation (specifically, adding an empty >> string) is attempted. Apparently your wrapper is not doing this. This >> is the duck-typing check for a string that mpl has used from early times. >> >> Eric > Is it possible that this could be better? I'm not sure what's happening > here, > but I think it is trying to see if my type can be a string first. It can, > but > that's not a good idea in this case. It should correctly support a sequence > (and iterator) protocol. Shouldn't matplotlib try that first? > No, it really needs to find out if it is a string, and a string is iterable, so a string-specific check is needed. Eric -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plot problem
Neal Becker wrote: > pylab.plot (xaxis, log10 (the_sum)*10) > where xaxis is numpy array, and log10(the_sum)*10 is my own class that is a > valid python sequence (it is a c++ wrapper around boost::ublas), gives: > File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- > x86_64.egg/matplotlib/pyplot.py", line 2096, in plot > ret = gca().plot(*args, **kwargs) > File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- > x86_64.egg/matplotlib/axes.py", line 3277, in plot > for line in self._get_lines(*args, **kwargs): > File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- > x86_64.egg/matplotlib/axes.py", line 394, in _grab_next_args > for seg in self._plot_2_args(remaining, **kwargs): > File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- > x86_64.egg/matplotlib/axes.py", line 267, in _plot_2_args > if is_string_like(tup2[1]): > File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- > x86_64.egg/matplotlib/cbook.py", line 277, in is_string_like > try: obj + '' > RuntimeError: check:: failed > > If I convert the 2nd arg to array, it works: >pylab.plot (xaxis, np.array(log10 (the_sum)*10)) > > Doesn't plot support arbitrary sequences? Partial correction to my previous post: is_string_like looks for a TypeError or ValueError to be raised. I suppose we could look for any exception, since your object raises a RuntimeError. I wonder whether it would be equally effective and more robust if the test were try: '' + obj instead of the other way around. Eric -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plot problem
On Friday 16 January 2009, Eric Firing wrote: > Neal Becker wrote: > > pylab.plot (xaxis, log10 (the_sum)*10) > > where xaxis is numpy array, and log10(the_sum)*10 is my own class that is > > a valid python sequence (it is a c++ wrapper around boost::ublas), gives: > > File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- > > x86_64.egg/matplotlib/pyplot.py", line 2096, in plot > > ret = gca().plot(*args, **kwargs) > > File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- > > x86_64.egg/matplotlib/axes.py", line 3277, in plot > > for line in self._get_lines(*args, **kwargs): > > File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- > > x86_64.egg/matplotlib/axes.py", line 394, in _grab_next_args > > for seg in self._plot_2_args(remaining, **kwargs): > > File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- > > x86_64.egg/matplotlib/axes.py", line 267, in _plot_2_args > > if is_string_like(tup2[1]): > > File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- > > x86_64.egg/matplotlib/cbook.py", line 277, in is_string_like > > try: obj + '' > > RuntimeError: check:: failed > > > > If I convert the 2nd arg to array, it works: > >pylab.plot (xaxis, np.array(log10 (the_sum)*10)) > > > > Doesn't plot support arbitrary sequences? > > Partial correction to my previous post: > is_string_like looks for a TypeError or ValueError to be raised. I > suppose we could look for any exception, since your object raises a > RuntimeError. > > I wonder whether it would be equally effective and more robust if the > test were > > try: '' + obj > > instead of the other way around. > > Eric IIRC, boost::python translates c++ exceptions to RuntimeError. If true, then it's a lot easier to fix matplotlib than to fix boost::python wrappers. -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plot problem
On Friday 16 January 2009, Eric Firing wrote: > Neal Becker wrote: > > pylab.plot (xaxis, log10 (the_sum)*10) > > where xaxis is numpy array, and log10(the_sum)*10 is my own class that is > > a valid python sequence (it is a c++ wrapper around boost::ublas), gives: > > File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- > > x86_64.egg/matplotlib/pyplot.py", line 2096, in plot > > ret = gca().plot(*args, **kwargs) > > File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- > > x86_64.egg/matplotlib/axes.py", line 3277, in plot > > for line in self._get_lines(*args, **kwargs): > > File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- > > x86_64.egg/matplotlib/axes.py", line 394, in _grab_next_args > > for seg in self._plot_2_args(remaining, **kwargs): > > File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- > > x86_64.egg/matplotlib/axes.py", line 267, in _plot_2_args > > if is_string_like(tup2[1]): > > File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- > > x86_64.egg/matplotlib/cbook.py", line 277, in is_string_like > > try: obj + '' > > RuntimeError: check:: failed > > > > If I convert the 2nd arg to array, it works: > >pylab.plot (xaxis, np.array(log10 (the_sum)*10)) > > > > Doesn't plot support arbitrary sequences? > > Not *completely* arbitrary, evidently. It has to raise a Python > exception when an invalid operation (specifically, adding an empty > string) is attempted. Apparently your wrapper is not doing this. This > is the duck-typing check for a string that mpl has used from early times. > > Eric Is it possible that this could be better? I'm not sure what's happening here, but I think it is trying to see if my type can be a string first. It can, but that's not a good idea in this case. It should correctly support a sequence (and iterator) protocol. Shouldn't matplotlib try that first? -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plot problem
Neal Becker wrote: > pylab.plot (xaxis, log10 (the_sum)*10) > where xaxis is numpy array, and log10(the_sum)*10 is my own class that is a > valid python sequence (it is a c++ wrapper around boost::ublas), gives: > File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- > x86_64.egg/matplotlib/pyplot.py", line 2096, in plot > ret = gca().plot(*args, **kwargs) > File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- > x86_64.egg/matplotlib/axes.py", line 3277, in plot > for line in self._get_lines(*args, **kwargs): > File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- > x86_64.egg/matplotlib/axes.py", line 394, in _grab_next_args > for seg in self._plot_2_args(remaining, **kwargs): > File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- > x86_64.egg/matplotlib/axes.py", line 267, in _plot_2_args > if is_string_like(tup2[1]): > File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- > x86_64.egg/matplotlib/cbook.py", line 277, in is_string_like > try: obj + '' > RuntimeError: check:: failed > > If I convert the 2nd arg to array, it works: >pylab.plot (xaxis, np.array(log10 (the_sum)*10)) > > Doesn't plot support arbitrary sequences? Not *completely* arbitrary, evidently. It has to raise a Python exception when an invalid operation (specifically, adding an empty string) is attempted. Apparently your wrapper is not doing this. This is the duck-typing check for a string that mpl has used from early times. Eric -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] plot problem
pylab.plot (xaxis, log10 (the_sum)*10) where xaxis is numpy array, and log10(the_sum)*10 is my own class that is a valid python sequence (it is a c++ wrapper around boost::ublas), gives: File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- x86_64.egg/matplotlib/pyplot.py", line 2096, in plot ret = gca().plot(*args, **kwargs) File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- x86_64.egg/matplotlib/axes.py", line 3277, in plot for line in self._get_lines(*args, **kwargs): File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- x86_64.egg/matplotlib/axes.py", line 394, in _grab_next_args for seg in self._plot_2_args(remaining, **kwargs): File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- x86_64.egg/matplotlib/axes.py", line 267, in _plot_2_args if is_string_like(tup2[1]): File "/usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- x86_64.egg/matplotlib/cbook.py", line 277, in is_string_like try: obj + '' RuntimeError: check:: failed If I convert the 2nd arg to array, it works: pylab.plot (xaxis, np.array(log10 (the_sum)*10)) Doesn't plot support arbitrary sequences? -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Plot problem
This is just to let you know that I fixed the plot problem by installing the newest Matplotlib (0.87.7) and creating ~/.matplotlib/matplotlibrc. Adam, John and Gary, thank you very much! Axel. Gary wrote: >> Axel> John, thanks for your suggestion. I would never have thought >> Axel> of looking for the cause of the problem in that >> Axel> direction. However, it isn't solved yet. The verbose mode >> Axel> yielded the line "numerix Numeric 23.7", which is apparently >> Axel> wrong. Actually I am trying to use SciPy, which I've heard >> Axel> is based on NumPy, so I believe this numerix thing should be >> Axel> connected with NumPy. I copied the file >> Axel> http://matplotlib.sf.net/matplotlibrc to >> Axel> ~/.matplotlib/matplotlibrc (such a file didn't exist) and >> Axel> now I get a new kind of error (see below). Do you (or >> Axel> anyone) have an idea what this is about? Thanks in advance! >> >> I'm sorry this is so frustrating -- it is certainly frustrating for >> me. The problem is that matplotlib is trying to support three array >> packages (Numeric, numarray and numpy) and numpy itself is a fast >> moving target so if you don't have exactly the right numpy with >> exactly the right scipy with exactly the right matplotlib it is >> unlikely to work. >> >> I suggest either the latest release of all three, or the latest svn of >> all three. I notice from your output that you have 0.87.3 which is >> several releases behind. Try getting numpy 1.0 and matplotlib 0.87.7. >> > Windows users have to watch out: the current Scipy binary installer is > out of sync with the current Numpy installer. > (I think the Scipy people are going to fix that soon. In the meantime, > I have a matched set of Numpy and Scipy installers for Windows and > Python 2.4.3 that works with the latest mpl binary installer. I'm happy > to provide my installers if anyone wants them. Contact me directly.) > > -gary > > > >> Good luck! >> JDH >> - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Plot problem
John Hunter wrote: >> "Axel" == Axel Brink <[EMAIL PROTECTED]> writes: >> > Axel> John, thanks for your suggestion. I would never have thought > Axel> of looking for the cause of the problem in that > Axel> direction. However, it isn't solved yet. The verbose mode > Axel> yielded the line "numerix Numeric 23.7", which is apparently > Axel> wrong. Actually I am trying to use SciPy, which I've heard > Axel> is based on NumPy, so I believe this numerix thing should be > Axel> connected with NumPy. I copied the file > Axel> http://matplotlib.sf.net/matplotlibrc to > Axel> ~/.matplotlib/matplotlibrc (such a file didn't exist) and > Axel> now I get a new kind of error (see below). Do you (or > Axel> anyone) have an idea what this is about? Thanks in advance! > > I'm sorry this is so frustrating -- it is certainly frustrating for > me. The problem is that matplotlib is trying to support three array > packages (Numeric, numarray and numpy) and numpy itself is a fast > moving target so if you don't have exactly the right numpy with > exactly the right scipy with exactly the right matplotlib it is > unlikely to work. > > I suggest either the latest release of all three, or the latest svn of > all three. I notice from your output that you have 0.87.3 which is > several releases behind. Try getting numpy 1.0 and matplotlib 0.87.7. Windows users have to watch out: the current Scipy binary installer is out of sync with the current Numpy installer. (I think the Scipy people are going to fix that soon. In the meantime, I have a matched set of Numpy and Scipy installers for Windows and Python 2.4.3 that works with the latest mpl binary installer. I'm happy to provide my installers if anyone wants them. Contact me directly.) -gary > Good luck! > JDH > > - > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Plot problem
> "Axel" == Axel Brink <[EMAIL PROTECTED]> writes: Axel> John, thanks for your suggestion. I would never have thought Axel> of looking for the cause of the problem in that Axel> direction. However, it isn't solved yet. The verbose mode Axel> yielded the line "numerix Numeric 23.7", which is apparently Axel> wrong. Actually I am trying to use SciPy, which I've heard Axel> is based on NumPy, so I believe this numerix thing should be Axel> connected with NumPy. I copied the file Axel> http://matplotlib.sf.net/matplotlibrc to Axel> ~/.matplotlib/matplotlibrc (such a file didn't exist) and Axel> now I get a new kind of error (see below). Do you (or Axel> anyone) have an idea what this is about? Thanks in advance! I'm sorry this is so frustrating -- it is certainly frustrating for me. The problem is that matplotlib is trying to support three array packages (Numeric, numarray and numpy) and numpy itself is a fast moving target so if you don't have exactly the right numpy with exactly the right scipy with exactly the right matplotlib it is unlikely to work. I suggest either the latest release of all three, or the latest svn of all three. I notice from your output that you have 0.87.3 which is several releases behind. Try getting numpy 1.0 and matplotlib 0.87.7. Good luck! JDH - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Plot problem
> Axel> Hello there, I have a strange plotting problem. In the > Axel> example below I expect three equal plots of f, g and h: a > Axel> simple inclined line, but g and h produce a sawtooth > Axel> plot. What do I do wrong? Any help would be greatly > Axel> appreceated. > > Not sure what your problem is -- I can run your script and get three > identical lines as expected. > > My guess if you are mixing numpy with an incorrect matplotlib numerix > setting. If you are creating your arrays with numpy, you need to set > "numerix :numpy" in your matplotlibrc file > > http://matplotlib.sf.net/matplotlibrc > > > You can find your numerix setting by running your script with > > > python myscript.py --verbose-helpful > > JDH > John, thanks for your suggestion. I would never have thought of looking for the cause of the problem in that direction. However, it isn't solved yet. The verbose mode yielded the line "numerix Numeric 23.7", which is apparently wrong. Actually I am trying to use SciPy, which I've heard is based on NumPy, so I believe this numerix thing should be connected with NumPy. I copied the file http://matplotlib.sf.net/matplotlibrc to ~/.matplotlib/matplotlibrc (such a file didn't exist) and now I get a new kind of error (see below). Do you (or anyone) have an idea what this is about? Thanks in advance! Axel. > python datasetPrepare.py --verbose-helpful matplotlib data path /usr/lib/python2.4/site-packages/matplotlib/mpl-data $HOME=/staf/axel CONFIGDIR=/staf/axel/.matplotlib loaded rc file /staf/axel/.matplotlib/matplotlibrc matplotlib version 0.87.3 verbose.level helpful interactive is False platform is linux2 Traceback (most recent call last): File "datasetPrepare.py", line 1, in ? import glob, os, Image, pylab, scipy, scipy.signal, copy File "/usr/lib/python2.4/site-packages/pylab.py", line 1, in ? from matplotlib.pylab import * File "/usr/lib/python2.4/site-packages/matplotlib/pylab.py", line 196, in ? import cm File "/usr/lib/python2.4/site-packages/matplotlib/cm.py", line 5, in ? import colors File "/usr/lib/python2.4/site-packages/matplotlib/colors.py", line 33, in ? from numerix import array, arange, take, put, Float, Int, where, \ File "/usr/lib/python2.4/site-packages/matplotlib/numerix/__init__.py", line 68, in ? from _sp_imports import nx, infinity File "/usr/lib/python2.4/site-packages/matplotlib/numerix/_sp_imports.py", line 1, in ? from numpy import Int8, UInt8, \ ImportError: cannot import name Int8 -- Axel Brink Ph.D student Artificial Intelligence University of Groningen www.ai.rug.nl/~axel Tel.: +31 (0)50 363 7410 Postal addr.: Grote Kruisstraat 2/1, 9712 TS, Groningen, The Netherlands Visiting addr.: Zernikepark 10, Groningen, The Netherlands - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Plot problem
> "Axel" == Axel Brink <[EMAIL PROTECTED]> writes: Axel> Hello there, I have a strange plotting problem. In the Axel> example below I expect three equal plots of f, g and h: a Axel> simple inclined line, but g and h produce a sawtooth Axel> plot. What do I do wrong? Any help would be greatly Axel> appreceated. Not sure what your problem is -- I can run your script and get three identical lines as expected. My guess if you are mixing numpy with an incorrect matplotlib numerix setting. If you are creating your arrays with numpy, you need to set "numerix :numpy" in your matplotlibrc file http://matplotlib.sf.net/matplotlibrc You can find your numerix setting by running your script with > python myscript.py --verbose-helpful JDH - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Plot problem
Hello there, I have a strange plotting problem. In the example below I expect three equal plots of f, g and h: a simple inclined line, but g and h produce a sawtooth plot. What do I do wrong? Any help would be greatly appreceated. Sincerely, Axel Brink. import numpy, pylab f = range(500) g = numpy.array(range(500)) h = list(numpy.array(range(500))) pylab.plot(f) pylab.figure() pylab.plot(g) pylab.figure() pylab.plot(h) pylab.show() -- Axel Brink Ph.D student Artificial Intelligence University of Groningen www.ai.rug.nl/~axel Tel.: +31 (0)50 363 7410 Postal addr.: Grote Kruisstraat 2/1, 9712 TS, Groningen, The Netherlands Visiting addr.: Zernikepark 10, Groningen, The Netherlands - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users