[Matplotlib-users] from pylab import * imports oldnumeric

2007-01-31 Thread Gary Ruben
I just picked up a problem posted over on the numpy list. I noticed that
from pylab import * is importing the oldnumeric-wrapper versions of
zeros(), ones() and empty(), and presumably other things too, into the
interactive namespace. Shouldn't it be picking up the versions from
numpy's main namespace for interactive use?

I picked this up because I use "ipython -pylab" and noticed that zeros()
etc. was generating integers instead of floats by default.

In ipython:

   Welcome to pylab, a matplotlib-based Python environment.
   For more information, type 'help(pylab)'.

In [1]: zeros?
Type:   function
Base Class: 
String Form:
Namespace:  Interactive
File:   c:\python24\lib\site-packages\numpy\oldnumeric\functions.py
Definition: zeros(shape, typecode='l', savespace=0, dtype=None)
Docstring:
 zeros(shape, dtype=int) returns an array of the given
dimensions which is initialized to all zeros


In [2]: import numpy as n

In [3]: n.zeros?
Type:   builtin_function_or_method
Base Class: 
String Form:
Namespace:  Interactive
Docstring:
 zeros((d1,...,dn),dtype=float,order='C')

Return a new array of shape (d1,...,dn) and type typecode with all
it's entries initialized to zero.

--
Gary R.

-
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] subplot does not work in svn

2007-01-31 Thread Chris Fonnesbeck

On 1/6/07, Eric Firing <[EMAIL PROTECTED]> wrote:


Chris,

I suspect it is a problem with your matplotlibrc file; you could try
stripping it down to bare minimum, as in the svn root directory.
Another possibility is that your update is somehow incomplete or
scrambled with an earlier installation.

If that doesn't work, try making a minimal script that illustrates the
problem.

examples/newscalarformatter_demo.py works fine, so I don't think the
basic subplot mechanism is broken.


Chris Fonnesbeck wrote:
> I have just updated to a matplotlib build from SVN, and now all my
> subplots generate errors:
>
> (Pdb) rows
> Out[3]: 2
> (Pdb) columns
> Out[3]: 2
> (Pdb) num
> Out[3]: 1
> (Pdb) subplot(rows, columns, num)
> *** KeyError: 'axes.formatter.limits'

I think this is a valid key in rcParams.

Doesn't the error trigger a full traceback that shows where it is coming
from?






I am still getting this problem. Here is an ipython traceback of a very
simple plot:

In [1]: from pylab import *

In [2]: plot([3,45,6],[7,9,2])
---
exceptions.KeyError  Traceback (most recent
call last)

/Users/chris/

/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/pylab.py
in plot(*args, **kwargs)
  2036 def plot(*args, **kwargs):
  2037 # allow callers to override the hold state by passing
hold=True|False
-> 2038 b = ishold()
  2039 h = popd(kwargs, 'hold', None)
  2040 if h is not None:

/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/pylab.py
in ishold()
   935 Return the hold status of the current axes
   936 """
--> 937 return gca().ishold()
   938
   939 def isinteractive():

/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/pylab.py
in gca(**kwargs)
   881 """
   882
--> 883 ax =  gcf().gca(**kwargs)
   884 return ax
   885

/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/figure.py
in gca(self, **kwargs)
   677 ax = self._axstack()
   678 if ax is not None: return ax
--> 679 return self.add_subplot(111, **kwargs)
   680 gca.__doc__ = dedent(gca.__doc__) % artist.kwdocd
   681

/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/figure.py
in add_subplot(self, *args, **kwargs)
   504 a = PolarSubplot(self, *args, **kwargs)
   505 else:
--> 506 a = Subplot(self, *args, **kwargs)
   507
   508

/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axes.py
in __init__(self, fig, *args, **kwargs)
  4909 """
  4910 SubplotBase.__init__(self, fig, *args)
-> 4911 Axes.__init__(self, fig, [self.figLeft, self.figBottom,
  4912   self.figW, self.figH], **kwargs)
  4913

/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axes.py
in __init__(self, fig, rect, axisbg, frameon, sharex, sharey, label,
**kwargs)
   437
   438 # this call may differ for non-sep axes, eg polar
--> 439 self._init_axis()
   440
   441

/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axes.py
in _init_axis(self)
   468 def _init_axis(self):
   469 "move this out of __init__ because non-separable axes don't
use it"
--> 470 self.xaxis = XAxis(self)
   471 self.yaxis = YAxis(self)
   472

/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axis.py
in __init__(self, axes)
   512 self.minorTicks = []
   513
--> 514 self.cla()
   515
   516 def get_children(self):

/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axis.py
in cla(self)
   533 'clear the current axis'
   534 self.set_major_locator(AutoLocator())
--> 535 self.set_major_formatter(ScalarFormatter())
   536 self.set_minor_locator(NullLocator())
   537 self.set_minor_formatter(NullFormatter())

/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/ticker.py
in __init__(self, useOffset, useMathText)
   269 self.format = ''
   270 self._scientific = True
--> 271 self._powerlimits = rcParams['axes.formatter.limits']
   272
   273 def __call__(self, x, pos=None):

KeyError: 'axes.formatter.limits'

The thing is, I deleted my entire ~/.matplotlib directory, hoping to start
clean. Where does matplotlib get its info when a .matplotlibrc is not
present in my home directory?
Thanks

--
Chris Fonnesbeck + Atlanta, GA + http://trichech.us
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'

Re: [Matplotlib-users] from pylab import * imports oldnumeric

2007-01-31 Thread Christopher Barker
Gary Ruben wrote:
> I just picked up a problem posted over on the numpy list. I noticed that
> from pylab import * is importing the oldnumeric-wrapper versions of
> zeros(), ones() and empty(), and presumably other things too, into the
> interactive namespace. Shouldn't it be picking up the versions from
> numpy's main namespace for interactive use?

My understanding is that pylab (and Numerix) is maintaining backward 
compatibility with itself, so the oldnumeric  form is the right one.

Another reason NOT to EVER use "import *"

Before too long, hopefully we'll only have to deal with numpy.

-Chris

-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

[EMAIL PROTECTED]

-
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] subplot does not work in svn

2007-01-31 Thread John Hunter
> "Chris" == Chris Fonnesbeck <[EMAIL PROTECTED]> writes:

Chris> The thing is, I deleted my entire ~/.matplotlib directory,
Chris> hoping to start clean. Where does matplotlib get its info
Chris> when a .matplotlibrc is not present in my home directory?

It first looks in the current working dir and then in ~/.matplotlib

Try running a sample script with --verbose-helpful and it will tell
you which file is being read...

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] subplot does not work in svn

2007-01-31 Thread Fernando Perez
On 1/31/07, Chris Fonnesbeck <[EMAIL PROTECTED]> wrote:

> I am still getting this problem. Here is an ipython traceback of a very
> simple plot:
>
> In [1]: from pylab import *

Chris, try

xmode verbose


in ipython right before running your code.  This will make the
traceback dump even more detail, which may help John and his evil
minions track down your little critter even faster.

Cheers,

f

-
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] subplot does not work in svn

2007-01-31 Thread Chris Fonnesbeck

On 1/31/07, John Hunter <[EMAIL PROTECTED]> wrote:


> "Chris" == Chris Fonnesbeck <[EMAIL PROTECTED]> writes:

   Chris> The thing is, I deleted my entire ~/.matplotlib directory,
   Chris> hoping to start clean. Where does matplotlib get its info
   Chris> when a .matplotlibrc is not present in my home directory?

It first looks in the current working dir and then in ~/.matplotlib

Try running a sample script with --verbose-helpful and it will tell
you which file is being read...






I copied the matplotlibrc file from the source in svn; here is what I get
using --verbose-helpful:

Osoyoos:~ chris$ python plot.py --verbose-helpful
plot.py:14: SyntaxWarning: import * only allowed at module level
 def main():
matplotlib data path
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/mpl-data
$HOME=/Users/chris
CONFIGDIR=/Users/chris/.matplotlib
loaded rc file /Users/chris/.matplotlib/matplotlibrc
matplotlib version 0.87.7
verbose.level helpful
interactive is False
platform is darwin
numerix numpy 1.0.2.dev3522
font search path
['/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/mpl-data']
loaded ttfcache file /Users/chris/.matplotlib/ttffont.cache
backend TkAgg version 8.4
Traceback (most recent call last):
 File "plot.py", line 20, in ?
   main()
 File "plot.py", line 16, in main
   plot(range(10), range(10))
 File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/pylab.py",
line 2038, in plot
   b = ishold()
 File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/pylab.py",
line 937, in ishold
   return gca().ishold()
 File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/pylab.py",
line 883, in gca
   ax =  gcf().gca(**kwargs)
 File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/figure.py",
line 679, in gca
   return self.add_subplot(111, **kwargs)
 File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/figure.py",
line 506, in add_subplot
   a = Subplot(self, *args, **kwargs)
 File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axes.py",
line 4911, in __init__
   Axes.__init__(self, fig, [self.figLeft, self.figBottom,
 File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axes.py",
line 439, in __init__
   self._init_axis()
 File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axes.py",
line 470, in _init_axis
   self.xaxis = XAxis(self)
 File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axis.py",
line 514, in __init__
   self.cla()
 File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axis.py",
line 535, in cla
   self.set_major_formatter(ScalarFormatter())
 File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/ticker.py",
line 271, in __init__
   self._powerlimits = rcParams['axes.formatter.limits']
KeyError: 'axes.formatter.limits'



--
Chris Fonnesbeck + Atlanta, GA + http://trichech.us
-
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] subplot does not work in svn

2007-01-31 Thread Eric Firing
Chris,

My guess is that you have some combination of 0.87.7 and svn; the 
traceback says 0.87.7, and the KeyError is because of an addition to 
rcParams since 0.87.7.

Try this:

In [1]:import matplotlib

In [2]:matplotlib.rcParams
Out[2]:
{'axes.axisbelow': False,
  'axes.edgecolor': 'k',
  'axes.facecolor': 'w',
  'axes.formatter.limits': (-7, 7),
  'axes.grid': False,
  'axes.hold': True,

etc. etc.

If you don't see the axes.formatter.limits key then your __init__.py is 
not from svn.  Maybe the thing to do is delete all versions and traces 
of matplotlib from your system and then re-download and install.

Eric

Chris Fonnesbeck wrote:
> On 1/31/07, *John Hunter* <[EMAIL PROTECTED] 
> > wrote:
> 
>  > "Chris" == Chris Fonnesbeck <[EMAIL PROTECTED]
> > writes:
> 
>Chris> The thing is, I deleted my entire ~/.matplotlib directory,
>Chris> hoping to start clean. Where does matplotlib get its info
>Chris> when a .matplotlibrc is not present in my home directory?
> 
> It first looks in the current working dir and then in ~/.matplotlib
> 
> Try running a sample script with --verbose-helpful and it will tell
> you which file is being read...
> 
> 
> 
> I copied the matplotlibrc file from the source in svn; here is what I 
> get using --verbose-helpful:
> 
> Osoyoos:~ chris$ python plot.py --verbose-helpful
> plot.py:14: SyntaxWarning: import * only allowed at module level
>   def main():
> matplotlib data path 
> /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/mpl-data
>  
> 
> $HOME=/Users/chris
> CONFIGDIR=/Users/chris/.matplotlib
> loaded rc file /Users/chris/.matplotlib/matplotlibrc
> matplotlib version 0.87.7
> verbose.level helpful
> interactive is False
> platform is darwin
> numerix numpy 1.0.2.dev3522
> font search path 
> ['/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/mpl-data']
> loaded ttfcache file /Users/chris/.matplotlib/ttffont.cache
> backend TkAgg version 8.4
> Traceback (most recent call last):
>   File "plot.py", line 20, in ?
> main()
>   File "plot.py", line 16, in main
> plot(range(10), range(10))
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/pylab.py",
>  
> line 2038, in plot
> b = ishold()
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/pylab.py",
>  
> line 937, in ishold
> return gca().ishold()
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/pylab.py",
>  
> line 883, in gca
> ax =  gcf().gca(**kwargs)
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/figure.py",
>  
> line 679, in gca
> return self.add_subplot(111, **kwargs)
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/figure.py",
>  
> line 506, in add_subplot
> a = Subplot(self, *args, **kwargs)
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axes.py",
>  
> line 4911, in __init__
> Axes.__init__(self, fig, [ self.figLeft, self.figBottom,
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axes.py",
>  
> line 439, in __init__
> self._init_axis()
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axes.py",
>  
> line 470, in _init_axis
> self.xaxis = XAxis(self)
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axis.py",
>  
> line 514, in __init__
> self.cla()
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axis.py",
>  
> line 535, in cla
> self.set_major_formatter(ScalarFormatter())
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/ticker.py",
>  
> line 271, in __init__
> self._powerlimits = rcParams['axes.formatter.limits ']
> KeyError: 'axes.formatter.limits'
> 
> 
> 
> -- 
> Chris Fonnesbeck + Atlanta, GA + http://trichech.us
> 
> 
> 
> 
> -
> 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/matplo

[Matplotlib-users] __init__.py not installed in svn build package

2007-01-31 Thread Chris Fonnesbeck

This may not be the appropriate place to post this, but I have built a
matplotlib installer for OS X, using setupegg.py:
python setupegg.py config -L../staticlibs build bdist_mpkg

However, when I import pylab, I get the follwing:
ImportError: No module named matplotlib.pylab

The problem appears to be that __init__.py is not included in the package;
when I do a standard install using setup.py, the file is copied over as it
should be.

--
Chris Fonnesbeck + Atlanta, GA + http://trichech.us
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] __init__.py not installed in svn build package

2007-01-31 Thread Christopher Barker
Chris Fonnesbeck wrote:
> I have built a 
> matplotlib installer for OS X, 

Sorry I can't help with your problem, but:

Which Python are you building against?
Which num* are you including
Which wxPython?
Which other back-ends.

I'd really love to see a workable installer that we can post on pythonmac!

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

[EMAIL PROTECTED]

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] __init__.py not installed in svn build package

2007-01-31 Thread Chris Fonnesbeck

On 1/31/07, Christopher Barker <[EMAIL PROTECTED]> wrote:


Chris Fonnesbeck wrote:
> I have built a
> matplotlib installer for OS X,

Sorry I can't help with your problem, but:

Which Python are you building against?


Which num* are you including

Which wxPython?
Which other back-ends.



ActiveState Python 2.4.3numpy from svn
no wxPython, just TkAgg

Curoiously, this only happens on my intel machine and not on my PPC! I have
tried pulling a completely new svn code, but it still happens.

--
Chris Fonnesbeck + Atlanta, GA + http://trichech.us
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Event attributes

2007-01-31 Thread Martin Wilson
Hi,

I'm using matplotlib in a GTK gui canvas with the GTKAgg backend.  I'm 
connecting a mouse click 'button_press_event' to the click function.  If 
I choose print event.x everything works fine.  However I'm after the x 
value in terms of the x-axis not pixels.  When I try print event.xdata I 
get an error message.  Am I making a stupid mistake or is this a bug?

Thanks

Martin

  
self.canvas.connect('button_press_event',self.click)

def click(self,widget,event):
print 'you clicked', event.xdata, event.ydata
#print 'you clicked', event.x, event.y


Traceback (most recent call last):
  File "./dangerplotpy", line 120, in click
print 'you clicked', event.xdata, event.ydata
AttributeError: xdata


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] so long [EMAIL PROTECTED]

2007-01-31 Thread John Hunter
Well, the old trusted email [EMAIL PROTECTED] is being
retired today.  It served me well for 12 years migrating from old Sun
boxes through countless linux boxes but since I'm no longer at
uchicago and the box it is running on is dying, I figured it is
finally time to give it up.  That and the fact that spamemrs have
harvested that address off of the usenet for 10+ years and spam-bayes
is losing the battle to them.  Hopefully google's spam filters will do
better.

So my future postings and annoucements will be coming from [EMAIL PROTECTED]

JDH

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] from pylab import * imports oldnumeric

2007-01-31 Thread Gary Ruben
Christopher Barker wrote:
 > Gary Ruben wrote:
 >> I just picked up a problem posted over on the numpy list. I noticed that
 >> from pylab import * is importing the oldnumeric-wrapper versions of
 >> zeros(), ones() and empty(), and presumably other things too, into the
 >> interactive namespace. Shouldn't it be picking up the versions from
 >> numpy's main namespace for interactive use?
 >
 > My understanding is that pylab (and Numerix) is maintaining backward
 > compatibility with itself, so the oldnumeric  form is the right one.
 >
 > Another reason NOT to EVER use "import *"

The way I tripped over this was using "ipython -pylab", which is doing 
this under the hood, so it's a little uglier in this case. What would be 
the effect on pylab using the newer numpy interactive namespace instead? 
I wonder whether matplotlib could check whether it has been imported by 
ipython interactively and import the newer namespace in this case, or 
whether there's a good argument for just dropping this little backward 
compatibility wart?

 > Before too long, hopefully we'll only have to deal with numpy.
 >
 > -Chris

I'll just cross-post Fernando (ipython) Perez's solution from the numpy 
list to aid anyone else who falls into this trap:

--

Until mpl drops support for the compatibility layers, you may want to
set up a simple pylab profile.  In ~/.ipython make a file called
'ipythonrc-pylab' consisting of:

###
# Load default config
include ipythonrc

# Add single-line python statements here
execute from numpy import *


Since pylab does a 'from .num?. import *' this will ensure that the
top-level visible functions are the current numpy ones, not the
compatibility layer ones.  You then start things with:

ipython -pylab -p pylab

and you'll get:

In [1]: zeros?
Type:   builtin_function_or_method
Base Class: 
Namespace:  Interactive
Docstring:
 zeros((d1,...,dn),dtype=float,order='C')

 Return a new array of shape (d1,...,dn) and type typecode with all
 it's entries initialized to zero.



Not ideal, but it's a little hack that will work in practice until we
finish crossing the muddy river of backwards compatibility.

Cheers,

f

--

Gary

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] segfault when running with pylab

2007-01-31 Thread Mark Heslep
Version information:
---
Vpython visual-4.beta14
In [2]: visual.__version__
Out[2]: '1.0.1'
Python 2.4.4, Fedora Core 6 updated.
python-matplotlib-0.87.7-3.fc6

Description:
A segfault is reliably produced when running vpython along with pylab / 
matplotlib functions:

cut--
from visual import *
from pylab import *

ball = sphere( pos=(0,0,0), color=color.red)
x=arrange(0,10,0.1)
y=sin(2*pi*x)
plot(x,y)
cut --


The segfault actually triggers on the plot call, but removing _either_ 
the visual sphere call _or_ the pylab plot call eliminates the segfault, 
with the either the plot or the ball rendering correctly.
Ive filed a bug w/ vpython.  Any ideas?

Regards,
Mark


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] segfault when running with pylab

2007-01-31 Thread Mark Heslep
Self follow-up:
Rolled back to visual 0.3.2.9 and the segfault with pylab is not present 
there; both the visual object and pylab graph are rendered correctly. 
Sorry vpython, looks like the bug is due to your new beta.

-Mark

Mark Heslep wrote:
> Version information:
> ---
> Vpython visual-4.beta14
> In [2]: visual.__version__
> Out[2]: '1.0.1'
> Python 2.4.4, Fedora Core 6 updated.
> python-matplotlib-0.87.7-3.fc6
>
> Description:
> A segfault is reliably produced when running vpython along with pylab / 
> matplotlib functions:
>
> cut--
> from visual import *
> from pylab import *
>
> ball = sphere( pos=(0,0,0), color=color.red)
> x=arrange(0,10,0.1)
> y=sin(2*pi*x)
> plot(x,y)
> cut --
>
>
> The segfault actually triggers on the plot call, but removing _either_ 
> the visual sphere call _or_ the pylab plot call eliminates the segfault, 
> with the either the plot or the ball rendering correctly.
> Ive filed a bug w/ vpython.  Any ideas?
>
> Regards,
> Mark
>
>
> -
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier.
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>   


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Question about the Matplotlib classic Toolbar - the pan feature to display only existent data..

2007-01-31 Thread maser rati
 Hi folks,
  
  reposting... has anyone a clue that might help in the right direction??
  
  was my question too hard or would it help better if I rephrased it ?
  
  thanks so much 
  
  maser
 
maser rati <[EMAIL PROTECTED]> wrote: Hi Folks,
 
 I was wondering how to set the Matplotlib classic Toolbar in order to display 
only existent data when the back/forward arrows are clicked (i.e, the pan 
feature) for a subplot that displays plotted data. 
 
 How to set the code in the matplotlib toolbar to only display the data from 
the file? ( clicking the left arrow when the left most point is at the start of 
the data file should result in freezing of the plot and a similar action when 
the right arrow is clicked when the right most point is at the end of the data 
file). 
 
 I'm not sure if my post was  sufficiently as clear as spring water. Any 
suggestions would be greatly appreciated.
 
 Great forum, by the way.. 
 
 Thanks.
 -Maser
   

-
Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink 
Q&A.-
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

   

-
Access over 1 million songs - Yahoo! Music 
Unlimited.-
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


 
-
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users