From: Shin <sd...@em...> - 2004-08-11 04:05:30
|
My first trial produced the following error message. What problem do you think is in my installation? I am using GtkAgg backend for matplotlib 0.6.1 version in Mandrake 10 and python 2.3.3. Thanks. >>> from matplotlib.matlab import * >>> x=arange(10) >>> plot(x) Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.3/site-packages/matplotlib/matlab.py", line 1176, in plot lines = gca().plot(*args, **kwargs) File "/usr/lib/python2.3/site-packages/matplotlib/matlab.py", line 762, in gca return get_current_fig_manager().get_current_axis() File "/usr/lib/python2.3/site-packages/matplotlib/matlab.py", line 251, in get_current_fig_manager gcf() # creates an active figure as a side effect File "/usr/lib/python2.3/site-packages/matplotlib/matlab.py", line 771, in gcf return figure() File "/usr/lib/python2.3/site-packages/matplotlib/matlab.py", line 691, in figure figManager = new_figure_manager(num, figsize, dpi, facecolor, edgecolor, frameon) File "/usr/lib/python2.3/site-packages/matplotlib/backends/backend_gtkagg.py", line 25, in new_figure_manager thisFig = Figure(*args, **kwargs) File "/usr/lib/python2.3/site-packages/matplotlib/figure.py", line 52, in __init__ facecolor=facecolor, edgecolor=edgecolor, File "/usr/lib/python2.3/site-packages/matplotlib/patches.py", line 130, in __init__ Patch.__init__(self, **kwargs) File "/usr/lib/python2.3/site-packages/matplotlib/patches.py", line 48, in __init__ self.__dict__['set_%s'%abbrev] = getattr(self, 'set_%s'%func) AttributeError: Rectangle instance has no attribute 'set_antialiased' -- Daehyok Shin |
From: John H. <jdh...@ac...> - 2004-08-11 13:43:23
|
>>>>> "Shin" == Shin <sd...@em...> writes: Shin> My first trial produced the following error message. What Shin> problem do you think is in my installation? I am using Shin> GtkAgg backend for matplotlib 0.6.1 version in Mandrake 10 Shin> and python 2.3.3. Thanks. That is very bizarre. Take a look at site-packages/matplotlib/patches.py - you should have set_antialiased defined on line 70 in the Patches class. Rectangle should derive from Patches on line 119. It looks a little like your build is messed up in some way I don't understand. You may want to try removing matplotlib from your site-packages dir, removing 'build' from your matplotlib src tree, adn doing a clean install. For the record, I did a clean install of 0.61.0 on a linux machine I don't normally develop on and ran your example without problems >>> from matplotlib.matlab import * >>> x=arange(10) >>> plot(x) [<matplotlib.lines.Line2D instance at 0x40d5e94c>] With the following in my .matplotlibrc file backend : TkAgg # the default backend numerix : Numeric # Numeric or numarray interactive : True toolbar : toolbar2 # None | classic | toolbar2 Let me know what you find. JDH >>>> from matplotlib.matlab import * x=arange(10) plot(x) Shin> Traceback (most recent call last): File "<stdin>", line 1, Shin> in ? File Shin> "/usr/lib/python2.3/site-packages/matplotlib/matlab.py", Shin> line 1176, in plot lines = gca().plot(*args, **kwargs) File Shin> "/usr/lib/python2.3/site-packages/matplotlib/matlab.py", Shin> line 762, in gca return Shin> get_current_fig_manager().get_current_axis() File Shin> "/usr/lib/python2.3/site-packages/matplotlib/matlab.py", Shin> line 251, in get_current_fig_manager gcf() # creates an Shin> active figure as a side effect File Shin> "/usr/lib/python2.3/site-packages/matplotlib/matlab.py", Shin> line 771, in gcf return figure() File Shin> "/usr/lib/python2.3/site-packages/matplotlib/matlab.py", Shin> line 691, in figure figManager = new_figure_manager(num, Shin> figsize, dpi, facecolor, edgecolor, frameon) File Shin> "/usr/lib/python2.3/site-packages/matplotlib/backends/backend_gtkagg.py", Shin> line 25, in new_figure_manager thisFig = Figure(*args, Shin> **kwargs) File Shin> "/usr/lib/python2.3/site-packages/matplotlib/figure.py", Shin> line 52, in __init__ facecolor=facecolor, Shin> edgecolor=edgecolor, File Shin> "/usr/lib/python2.3/site-packages/matplotlib/patches.py", Shin> line 130, in __init__ Patch.__init__(self, **kwargs) File Shin> "/usr/lib/python2.3/site-packages/matplotlib/patches.py", Shin> line 48, in __init__ self.__dict__['set_%s'%abbrev] = Shin> getattr(self, 'set_%s'%func) AttributeError: Rectangle Shin> instance has no attribute 'set_antialiased' Shin> -- Daehyok Shin Shin> ------------------------------------------------------- Shin> SF.Net email is sponsored by Shop4tech.com-Lowest price on Shin> Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic Shin> DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shin> Shipping and Free Gift. Shin> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 Shin> _______________________________________________ Shin> Matplotlib-users mailing list Shin> Mat...@li... Shin> https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Shin <sd...@em...> - 2004-08-11 15:50:41
|
As you said, my packages were messed up. After removing site-package and build, the problem was gone. I have no idea about what happened, but thanks for your advice. Daehyok Shin On Wed, 2004-08-11 at 09:19, John Hunter wrote: > That is very bizarre. Take a look at > site-packages/matplotlib/patches.py - you should have set_antialiased > defined on line 70 in the Patches class. Rectangle should derive from > Patches on line 119. > > It looks a little like your build is messed up in some way I don't > understand. You may want to try removing matplotlib from your > site-packages dir, removing 'build' from your matplotlib src tree, adn > doing a clean install. |