Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #103270

Re: [newbie] Problem with matplotlib

X-Received by 10.98.8.15 with SMTP id c15mr18355722pfd.0.1455987937631; Sat, 20 Feb 2016 09:05:37 -0800 (PST)
X-Received by 10.50.138.165 with SMTP id qr5mr42794igb.10.1455987937585; Sat, 20 Feb 2016 09:05:37 -0800 (PST)
Path csiph.com!feeder.erje.net!2.us.feeder.erje.net!weretis.net!feeder6.news.weretis.net!news.glorb.com!hb3no7559662igb.0!news-out.google.com!kr2ni1938igb.0!nntp.google.com!hb3no7559652igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.python
Date Sat, 20 Feb 2016 09:05:36 -0800 (PST)
In-Reply-To <mailman.16.1455957803.13884.python-list@python.org>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=81.242.27.101; posting-account=yKN1VQkAAACKLvxY4w2ACbbcoO6ks0rX
NNTP-Posting-Host 81.242.27.101
References <1751492a-45ae-422d-8819-17de767a94c4@googlegroups.com> <mailman.16.1455957803.13884.python-list@python.org>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <5fefa9ca-31a2-41a2-8fd4-97367e0a6c3f@googlegroups.com> (permalink)
Subject Re: [newbie] Problem with matplotlib
From jenswaelkens@gmail.com
Injection-Date Sat, 20 Feb 2016 17:05:37 +0000
Content-Type text/plain; charset=ISO-8859-1
Xref csiph.com comp.lang.python:103270

Show key headers only | View raw


Op zaterdag 20 februari 2016 09:43:35 UTC+1 schreef Mark Lawrence:
> On 20/02/2016 07:42, jenswaelkens@gmail.com wrote:
> > When I use either of the following commands I get an error for which I don't have a solution, could someone here help me further?
> > These are the commands:
> > import matplotlib.pyplot as plt
> 
> Are you certain that this is what you typed?
> 
> C:\Users\Mark\Desktop>py -2.7
> Python 2.7.10 (default, May 23 2015, 09:44:00) [MSC v.1500 64 bit 
> (AMD64)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
>  >>> import matplotlib.pyplot as plt
>  >>>
> 
> Please have another go.
> 
> >
> > or
> >
> > from matplotlib.pyplot import pyplot as plt
> 
> The above is incorrect, you are trying to import 'pyplot' from 
> 'matplotlib.pyplot'.

You are right, this doesn't work, I got it from some source on the Internet tryin to solve the initial problem with the other statement...Anyway, as you see in my other reply, the problem has been solved.

kind regards,
Jens

> 
> >
> > This is the error I get:
> > Traceback (most recent call last):
> >    File "/home/waelkens/matplotlibdemo.py", line 2, in <module>
> >      from matplotlib.pyplot import pyplot as plt
> >    File "/usr/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 27, in <module>
> >      import matplotlib.colorbar
> >    File "/usr/lib/python2.7/dist-packages/matplotlib/colorbar.py", line 36, in <module>
> >      import matplotlib.contour as contour
> >    File "/usr/lib/python2.7/dist-packages/matplotlib/contour.py", line 17, in <module>
> >      import matplotlib.ticker as ticker
> >    File "/usr/lib/python2.7/dist-packages/matplotlib/ticker.py", line 152, in <module>
> >      import decimal
> >    File "/usr/lib/python2.7/decimal.py", line 3744, in <module>
> >      _numbers.Number.register(Decimal)
> > AttributeError: 'module' object has no attribute 'Number'
> >
> > thanks in advance
> > Jens
> >
> 
> With this type of problem I'm inclined to throw the last line of the 
> traceback, here the 'AttributeError' one, into a search engine and see 
> what you come up with.  The hits you get are often enough to help you 
> diagnose the problem.
> 
> -- 
> My fellow Pythonistas, ask not what our language can do for you, ask
> what you can do for our language.
> 
> Mark Lawrence

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[newbie] Problem with matplotlib jenswaelkens@gmail.com - 2016-02-19 23:42 -0800
  Re: [newbie] Problem with matplotlib Dave Farrance <df@see.replyto.invalid> - 2016-02-20 08:30 +0000
    Re: [newbie] Problem with matplotlib Dave Farrance <df@see.replyto.invalid> - 2016-02-20 08:49 +0000
      Re: [newbie] Problem with matplotlib Dave Farrance <df@see.replyto.invalid> - 2016-02-20 09:19 +0000
      Re: [newbie] Problem with matplotlib jenswaelkens@gmail.com - 2016-02-20 09:02 -0800
  Re: [newbie] Problem with matplotlib Mark Lawrence <breamoreboy@yahoo.co.uk> - 2016-02-20 08:42 +0000
    Re: [newbie] Problem with matplotlib jenswaelkens@gmail.com - 2016-02-20 09:05 -0800

csiph-web