Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!rt.uk.eu.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!news.nosignal.org!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'win32': 0.03; 'exception': 0.03; 'installed.': 0.05; 'skip:" 60': 0.05; '*args,': 0.07; 'arguments': 0.07; 'subject:Error': 0.07; 'tkinter': 0.07; 'python': 0.09; '**kwargs)': 0.09; '[1]:': 0.09; '[2]:': 0.09; '[3]:': 0.09; 'callback': 0.09; 'follows.': 0.09; 'typeerror:': 0.09; 'cc:addr:python-list': 0.10; 'dec': 0.15; '236,': 0.16; '55,': 0.16; '[4]:': 0.16; 'numpy': 0.16; 'pylab': 0.16; 'resize': 0.16; 'skip:f 60': 0.16; 'wrote:': 0.17; '(in': 0.18; '>>>': 0.18; 'appears': 0.18; 'module': 0.19; 'skip:" 30': 0.20; 'trying': 0.21; 'bit': 0.21; 'import': 0.21; 'sorry,': 0.22; 'cc:2**0': 0.23; 'example': 0.23; 'errors': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; '(most': 0.27; 'skip:" 50': 0.27; 'message-id:@mail.gmail.com': 0.27; 'subject:/': 0.28; 'fine': 0.28; '>>>>': 0.29; 'keyword': 0.30; 'point': 0.31; 'december': 0.32; 'file': 0.32; 'skip:s 30': 0.33; '2008,': 0.33; 'idle': 0.33; 'traceback': 0.33; 'skip:d 20': 0.34; 'received:google.com': 0.34; 'expected': 0.35; 'received:209.85': 0.35; 'should': 0.36; 'problems': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'takes': 0.39; 'header:Received:5': 0.40; 'your': 0.60; 'group,': 0.60; 'address': 0.60; 'skip:n 10': 0.63; 'more': 0.63; 'learned': 0.65; 'dear': 0.66; 'kindly': 0.67; 'oscar': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=vPIXLKfQPj9wsZe6w68mxWeTFuWvpxa5VfXTAEKf8ec=; b=iKiVq7QYeocDrEM+4TuQlXJMNRm5EbMsguvlfuPiAGp8pVkra7tKXlSmTR9oGVWpvM TqWM/sj48X/GzF+2qo2iRWPZRnMDQPa2BeLbQjrxt1dMJ1BwgmrNCrg2Hd+QTfVotU59 2zbi5UXEk9/thBo+by+GnyGLuaG0OhG5ekS2xaD3yQh0N4ETTiSOG6smIfR28bNwfEGR dxACSMN0xsVAkf64vy85zCL7LEpz3Y8ynwHaSJjf6MVvWoS2/xJhRsvljJQ+dZZ8QIkf /c1Mgyeo373FggImt7n1LQoU7MJ6odKygrgadrGU6ehF7e4iJSLjeNPz03Frn3VQIbGA 6oeQ== MIME-Version: 1.0 In-Reply-To: <53ef294d-e46a-4734-9227-1ca766e056ae@googlegroups.com> References: <53ef294d-e46a-4734-9227-1ca766e056ae@googlegroups.com> Date: Wed, 12 Dec 2012 00:10:33 +0000 Subject: Re: Matplotlib/Pylab Error From: Oscar Benjamin To: subhabangalore@gmail.com Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 78 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1355280291 news.xs4all.nl 6851 [2001:888:2000:d::a6]:39677 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:34678 On 10 December 2012 20:40, wrote: > Dear Group, > > I am trying to enumerate few interesting errors on pylab/matplotlib. > If any of the learned members can kindly let me know how should I address them. > > I am trying to enumerate them as follows. > > i) >>> import numpy >>>> import pylab >>>> t = numpy.arange(0.0, 1.0+0.01, 0.01) >>>> s = numpy.cos(2*2*numpy.pi*t) >>>> pylab.plot(t, s) > [] >>>> pylab.show() > Exception in Tkinter callback > Traceback (most recent call last): > File "C:\Python26\lib\lib-tk\Tkinter.py", line 1410, in __call__ > return self.func(*args) > File "C:\Python26\Lib\site-packages\matplotlib\backends\backend_tkagg.py", line 236, in resize > self.show() > File "C:\Python26\Lib\site-packages\matplotlib\backends\backend_tkagg.py", line 239, in draw > FigureCanvasAgg.draw(self) > File "C:\Python26\Lib\site-packages\matplotlib\backends\backend_agg.py", line 421, in draw > self.figure.draw(self.renderer) > File "C:\Python26\Lib\site-packages\matplotlib\artist.py", line 55, in draw_wrapper > draw(artist, renderer, *args, **kwargs) > File "C:\Python26\Lib\site-packages\matplotlib\figure.py", line 898, in draw > func(*args) > File "C:\Python26\Lib\site-packages\matplotlib\artist.py", line 55, in draw_wrapper > draw(artist, renderer, *args, **kwargs) > File "C:\Python26\Lib\site-packages\matplotlib\axes.py", line 1997, in draw > a.draw(renderer) > File "C:\Python26\Lib\site-packages\matplotlib\artist.py", line 55, in draw_wrapper > draw(artist, renderer, *args, **kwargs) > File "C:\Python26\Lib\site-packages\matplotlib\axis.py", line 1045, in draw > tick.draw(renderer) > File "C:\Python26\Lib\site-packages\matplotlib\artist.py", line 55, in draw_wrapper > draw(artist, renderer, *args, **kwargs) > File "C:\Python26\Lib\site-packages\matplotlib\axis.py", line 239, in draw > self.label1.draw(renderer) > File "C:\Python26\Lib\site-packages\matplotlib\artist.py", line 55, in draw_wrapper > draw(artist, renderer, *args, **kwargs) > File "C:\Python26\Lib\site-packages\matplotlib\text.py", line 591, in draw > ismath=ismath) > File "C:\Python26\Lib\site-packages\matplotlib\backends\backend_agg.py", line 167, in draw_text > font.draw_glyphs_to_bitmap(antialiased=rcParams['text.antialiased']) > TypeError: draw_glyphs_to_bitmap() takes no keyword arguments > > ii) Python 2.6.1 (r261:67517, Dec 4 2008, 16:51:00) [MSC v.1500 32 bit (Intel)] on win32 > Type "copyright", "credits" or "license()" for more information. > The example above works for me just fine (in ipython): In [1]: import pylab In [2]: import numpy In [3]: t = numpy.arange(0.0, 1.0+0.01, 0.01) In [4]: s = numpy.cos(2*2*numpy.pi*t) In [5]: pylab.plot(t, s) Out[5]: [] In [6]: pylab.show() # At this point a plot of cos(t) appears as expected Have you customised your matplotlibrc file? I have no problems with the above, > > IDLE 2.6.1 >>>> import networkx as nx Sorry, I don't have this module installed. Oscar