|
From: Andy C. <And...@br...> - 2008-01-28 17:40:17
|
Hi people I'm trying to use matplotlib, ipython and xubuntu(gusty) all together. Whenever I try to run ipython with -pylab tab, nothing extra happens to the start up screen and pylab hasn't been imported. I have managed to sucessfull install ipython and matplotlib on a Redhat system and ipython -pylab works. ipython and matplotlib work btw I've tried install from source, apt and easy_install all to to avail Can anyone suggest what I am doing wrong or an output to post to show more details of what is happening on my machine Thanks Andy |
|
From: Tim M. <tim...@gm...> - 2008-01-28 19:25:10
|
Hello, for me it works: **** timmie@localhost:~$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=7.10 DISTRIB_CODENAME=gutsy DISTRIB_DESCRIPTION="Ubuntu 7.10" timmie@localhost:~$ ipython -pylab Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32) Type "copyright", "credits" or "license" for more information. IPython 0.8.1 -- An enhanced Interactive Python. ? -> Introduction to IPython's features. %magic -> Information about IPython's 'magic' % functions. help -> Python's own help system. object? -> Details about 'object'. ?object also works, ?? prints more. Welcome to pylab, a matplotlib-based Python environment. For more information, type 'help(pylab)'. **** I would suggest to reinstall the necessary packages. Kind regards, Timmie |
|
From: Tim M. <tim...@gm...> - 2008-01-29 23:13:44
|
Hello!
> Hmm, I did reinstall and still no joy, it insists on install python2.4
> at the same time!
do a
$: sudo apt-get --purge remove matplotlib ipython
to really remove the configuration files. then
$: sudo apt-get install matplotlib ipython
check if pylab is on your system:
$: locate pylab
Here are the contents of pylab:
from matplotlib.pylab import *
so you may just test this in a python shell:
$ python
Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from matplotlib.pylab import *
>>>
then do the same from within ipython as I'd shown in my previous mail.
I hope that this helps you to narrow it down.
I have also some troubles with ipython that is currently in Gutsy:
ipython
Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32)
Type "copyright", "credits" or "license" for more information.
IPython 0.8.1 -- An enhanced Interactive Python.
? -> Introduction to IPython's features.
%magic -> Information about IPython's 'magic' % functions.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
In [1]: import timeseries as TS
In [2]: whos
---------------------------------------------------------------------------
<type 'exceptions.AttributeError'> Traceback (most recent call last)
/var/tmp/install/qgislite_trunk/<ipython console> in <module>()
/var/lib/python-support/python2.5/IPython/iplib.py in ipmagic(self, arg_s)
962 else:
963 magic_args = self.var_expand(magic_args,1)
--> 964 return fn(magic_args)
965
966 def ipalias(self,arg_s):
/var/lib/python-support/python2.5/IPython/Magic.py in magic_whos(self,
parameter_s)
989 array_type = None
990 else:
--> 991 array_type = Numeric.ArrayType.__name__
992
993 # Find all variable names and types so we can figure
out column sizes
<type 'exceptions.AttributeError'>: 'module' object has no attribute
'ArrayType'
maybe some of the IPython power users can give me a hint why this
happes. [1]
I have already filed a bug report to Ubuntu but are not able to explain
more:
magic function whos not working in ipython
https://bugs.launchpad.net/ubuntu/+source/ipython/+bug/177253
Kind regards,
Timmie
[1] Thats Why I crosspost to ipython-user. Inital post was:
http://permalink.gmane.org/gmane.comp.python.matplotlib.general/11463
|
|
From: j v. <jim...@no...> - 2008-01-28 20:06:53
Attachments:
reuse.py
|
Hello users,
I wish to repeatedly re-plot labels and contour data on a figure since
redrawing the figure is temporally expensive. The attached script (I
apologize for its length), hopefully, illustrates a simplified version
of what I'm trying to do -- contour temporally-varying data on a map
projection.
I do not understand how to erase the plot label each time the figure is
to be reused. I also do not know how to erase the contour-fill
although, based on the generated PNG files, it does not, for unknown
reasons , appear to be necessary. From some postings, it seems that I
have to employ collections attributes, but I have not been able to find
documentation or examples that illustrate this.
My system:
* matplotlib.__version__: '0.91.2'
* sys.version: '2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC
v.1310 32 bit (Intel)]'
Thanks,
-- jv
|
|
From: Andy C. <And...@br...> - 2008-01-29 13:28:19
|
The error was due to muppetdom of the highest degree... I've created a bash alias which subsituted ipython with ipython ---options. Subsequent use of ipython -pylab put the -pylab tab at the end and it was quietly ignored Sorry to waste people time Andy j vickroy wrote: > Hello users, > > I wish to repeatedly re-plot labels and contour data on a figure since > redrawing the figure is temporally expensive. The attached script (I > apologize for its length), hopefully, illustrates a simplified version > of what I'm trying to do -- contour temporally-varying data on a map > projection. > > I do not understand how to erase the plot label each time the figure > is to be reused. I also do not know how to erase the contour-fill > although, based on the generated PNG files, it does not, for unknown > reasons , appear to be necessary. From some postings, it seems that I > have to employ collections attributes, but I have not been able to > find documentation or examples that illustrate this. > > My system: > > * matplotlib.__version__: '0.91.2' > * sys.version: '2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC > v.1310 32 bit (Intel)]' > > > Thanks, > -- jv > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: John H. <jd...@gm...> - 2008-01-29 14:23:42
|
On Jan 28, 2008 2:06 PM, j vickroy <jim...@no...> wrote: > Hello users, > > I wish to repeatedly re-plot labels and contour data on a figure since > redrawing the figure is temporally expensive. The attached script (I > apologize for its length), hopefully, illustrates a simplified version > of what I'm trying to do -- contour temporally-varying data on a map > projection. matplotlib has some support for the kinds of things you are trying to do -- eg draw an expensive part of the figure, save it, plot something on top of it, erase it, restore the original figure, etc. This is convered in some detail in the animation cookbook recipe. Although you are not doing animation, the concepts are quite similar in that both require copying and restoring a background, and updating the "animated" object. http://www.scipy.org/Cookbook/Matplotlib/Animations JDH |
|
From: postmaster <pos...@aj...> - 2008-01-29 03:24:09
|
I just migrated from edgy to gutsy this weekend. I did a clean install (boy it really went smoothly - either I'm getting better or the installs are) and it all works fine for me. I used Adept Manager to install everything. You installed numpy? I'm running kubuntu. On Mon, 28 Jan 2008 17:39:45 +0000 Andy Cheesman <And...@br...> wrote: > Hi people > > I'm trying to use matplotlib, ipython and xubuntu(gusty) all together. > Whenever I try to run ipython with -pylab tab, nothing extra happens to > the start up screen and pylab hasn't been imported. I have managed to > sucessfull install ipython and matplotlib on a Redhat system and ipython > -pylab works. ipython and matplotlib work btw > > I've tried install from source, apt and easy_install all to to avail > > Can anyone suggest what I am doing wrong or an output to post to show > more details of what is happening on my machine > > Thanks > > Andy > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- ----------------------------------------------------------------------- | Alan K. Jackson | To see a World in a Grain of Sand | | al...@aj... | And a Heaven in a Wild Flower, | | www.ajackson.org | Hold Infinity in the palm of your hand | | Houston, Texas | And Eternity in an hour. - Blake | ----------------------------------------------------------------------- |
|
From: Fernando P. <fpe...@gm...> - 2008-01-29 23:21:58
|
On Jan 29, 2008 4:13 PM, Tim Michelsen <tim...@gm...> wrote: > In [1]: import timeseries as TS > > In [2]: whos > --------------------------------------------------------------------------- > <type 'exceptions.AttributeError'> Traceback (most recent call last) > > /var/tmp/install/qgislite_trunk/<ipython console> in <module>() > > /var/lib/python-support/python2.5/IPython/iplib.py in ipmagic(self, arg_s) > 962 else: > 963 magic_args = self.var_expand(magic_args,1) > --> 964 return fn(magic_args) > 965 > 966 def ipalias(self,arg_s): > > /var/lib/python-support/python2.5/IPython/Magic.py in magic_whos(self, > parameter_s) > 989 array_type = None > 990 else: > --> 991 array_type = Numeric.ArrayType.__name__ > 992 > 993 # Find all variable names and types so we can figure > out column sizes > > <type 'exceptions.AttributeError'>: 'module' object has no attribute > 'ArrayType' > > maybe some of the IPython power users can give me a hint why this > happes. [1] Very strange. I can't reproduce it here (on gutsy, but running ipython from my own tree). What's odd is this: In [1]: import Numeric In [2]: print Numeric.ArrayType <type 'array'> So Numeric *most definitely* has an ArrayType member. Try doing the same as I did, also showing us whether you started ipython with -pylab or not. There may be something odd about your Numeric installation. Also do this: In [3]: Numeric? Type: module Base Class: <type 'module'> Namespace: Interactive File: /usr/lib/python2.5/site-packages/Numeric/Numeric.py [etc] It's possible that you have in your path a file called Numeric.py which is not the 'real' Numeric module. This would explain your problem and why nobody else sees it. Cheers, f |
|
From: Tim M. <tim...@gm...> - 2008-02-01 00:08:24
|
Hello Fernando,
>> <type 'exceptions.AttributeError'>: 'module' object has no attribute
>> 'ArrayType'
>>
>> maybe some of the IPython power users can give me a hint why this
>> happes. [1]
>
> Very strange. I can't reproduce it here (on gutsy, but running
> ipython from my own tree). What's odd is this:
>
> In [1]: import Numeric
>
> In [2]: print Numeric.ArrayType
> <type 'array'>
>
>
> So Numeric *most definitely* has an ArrayType member. Try doing the
> same as I did, also showing us whether you started ipython with -pylab
> or not. There may be something odd about your Numeric installation.
> Also do this:
>
> In [3]: Numeric?
> Type: module
> Base Class: <type 'module'>
> Namespace: Interactive
> File: /usr/lib/python2.5/site-packages/Numeric/Numeric.py
>
> [etc]
>
> It's possible that you have in your path a file called Numeric.py
> which is not the 'real' Numeric module. This would explain your
> problem and why nobody else sees it.
>
> Cheers,
>
> f
*** my output ***
$ ipython
Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32)
Type "copyright", "credits" or "license" for more information.
IPython 0.8.1 -- An enhanced Interactive Python.
? -> Introduction to IPython's features.
%magic -> Information about IPython's 'magic' % functions.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
In [1]: import Numeric
In [2]: print Numeric.ArrayType
---------------------------------------------------------------------------
<type 'exceptions.AttributeError'> Traceback (most recent call last)
/home/timmie/<ipython console> in <module>()
<type 'exceptions.AttributeError'>: 'module' object has no attribute
'ArrayType'
In [3]: Numeric?
Type: module
Base Class: <type 'module'>
String Form: <module 'Numeric' from
'/home/timmie/development/python/modules/modules_library/Numeric/__init__.pyc'>
Namespace: Interactive
File:
/home/timmie/development/python/modules/modules_library/Numeric/__init__.py
Docstring:
<no docstring>
In [4]:
*** end code ***
=> You were absolutely right:
I had another Numeric package install in my PYTHONPATH. It overwrode the
system package at:
/usr/lib/python2.5/site-packages/Numeric/Numeric.py
I just deleted
/home/timmie/development/python/modules/modules_library/Numeric and now
everything to goes nice. I can use my Ipython again with numerics ;-)
Well, I guess the problem arose from the a time when I didn't have
network access.
I just threw python modules from the net into my PYTHONPATH without
using the Synaptic package manager.
Nice that this is now solved. Thanks for your quick answer and help!
Kind regards,
Timmie
|