[matplotlib-devel] recent changes

2006-11-10 Thread Darren Dale
Can anyone reproduce this error? I am using up-to-date svn matplotlib, with 
either numpy or numeric:

plot([1,2])

---
exceptions.TypeError Traceback (most recent 
call last)

/home/darren/

/usr/lib64/python2.4/site-packages/matplotlib/pylab.py in plot(*args, 
**kwargs)
   3087 hold(h)
   3088 try:
-> 3089 ret =  gca().plot(*args, **kwargs)
   3090 draw_if_interactive()
   3091 except:

/usr/lib64/python2.4/site-packages/matplotlib/axes.py in plot(self, *args, 
**kwargs)
   2137 lines = [line for line in lines] # consume the generator
   2138
-> 2139 self.autoscale_view(scalex=scalex, scaley=scaley)
   2140 return lines
   2141

/usr/lib64/python2.4/site-packages/matplotlib/axes.py in autoscale_view(self, 
tight, scalex, scaley)
991 if xl[1] < xl[0]:
992 XL = XL[::-1]
--> 993 self.set_xlim(XL)
994 if scaley:
995 yl = self.get_ylim()

/usr/lib64/python2.4/site-packages/matplotlib/axes.py in set_xlim(self, xmin, 
xmax, emit)
   1233 xmax += 1e-38
   1234
-> 1235 self.viewLim.intervalx().set_bounds(xmin, xmax)
   1236 if emit: self._send_xlim_event()
   1237 return xmin, xmax

TypeError: only length-1 arrays can be converted to Python scalars.

Darren

-
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-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] A very little error in documentation of pylab.subplots_adjust

2006-11-10 Thread Nicolas Grilly
I guess there is a very little error in documentation of pylab.subplots_adjust.The order of the arguments in the current doc is:    subplots_adjust(left=None, right=None, bottom=None, top=None, wspace=0.2, hspace=
0.2)The correct order of the arguments seems to be:    subplots_adjust(left=None, bottom=None, right=None, top=None, wspace=0.2, hspace=0.2)
Is it correct?Thanks,Nicolas-- Garden - Conseil en Marketing & DataminingNicolas GrillyTel +33 1 45 72 48 78Mob +33 6 03 00 25 34
www.garden-paris.com
-
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-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] A very little error in documentation of pylab.subplots_adjust

2006-11-10 Thread John Hunter
> "Nicolas" == Nicolas Grilly <[EMAIL PROTECTED]> writes:

Nicolas> I guess there is a very little error in documentation of
Nicolas> pylab.subplots_adjust.

Nicolas> The order of the arguments in the current doc is:
Nicolas> subplots_adjust(left=None, right=None, bottom=None,
Nicolas> top=None, wspace=0.2, hspace=0.2)

Nicolas> The correct order of the arguments seems to be:
Nicolas> subplots_adjust(left=None, bottom=None, right=None,
Nicolas> top=None, wspace=0.2, hspace=0.2)

Nicolas> Is it correct?

Yep that's right, thanks.  I always use the kwarg version and hadn't
noticed the docstring bug.

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-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] recent changes

2006-11-10 Thread Darren Dale
Let me correct that, I only see this problem with Numeric. numarray and numpy 
appear to be fine.

On Friday 10 November 2006 13:23, Darren Dale wrote:
> Can anyone reproduce this error? I am using up-to-date svn matplotlib, with
> either numpy or numeric:
>
> plot([1,2])
>
> ---
> exceptions.TypeError Traceback (most recent
> call last)
>
> /home/darren/
>
> /usr/lib64/python2.4/site-packages/matplotlib/pylab.py in plot(*args,
> **kwargs)
>3087 hold(h)
>3088 try:
> -> 3089 ret =  gca().plot(*args, **kwargs)
>3090 draw_if_interactive()
>3091 except:
>
> /usr/lib64/python2.4/site-packages/matplotlib/axes.py in plot(self, *args,
> **kwargs)
>2137 lines = [line for line in lines] # consume the generator
>2138
> -> 2139 self.autoscale_view(scalex=scalex, scaley=scaley)
>2140 return lines
>2141
>
> /usr/lib64/python2.4/site-packages/matplotlib/axes.py in
> autoscale_view(self, tight, scalex, scaley)
> 991 if xl[1] < xl[0]:
> 992 XL = XL[::-1]
> --> 993 self.set_xlim(XL)
> 994 if scaley:
> 995 yl = self.get_ylim()
>
> /usr/lib64/python2.4/site-packages/matplotlib/axes.py in set_xlim(self,
> xmin, xmax, emit)
>1233 xmax += 1e-38
>1234
> -> 1235 self.viewLim.intervalx().set_bounds(xmin, xmax)
>1236 if emit: self._send_xlim_event()
>1237 return xmin, xmax
>
> TypeError: only length-1 arrays can be converted to Python scalars.


-
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-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Question about subplots_adjust

2006-11-10 Thread Nicolas Grilly
I'm playing with subplots_adjust, and I'm not comfortable with
parameters wspace and hspace.

Reading the doc, and the code, I've understood that:
- left, bottom, right and top can be considered as a "percentage" of
figure's width and height
- wspace and hspace can be considered as a "percentage" of subplots's
width and height

In other words, left/bottom/right/top and wspace/hspace are not given
in the same "unit": the former is given in "figure unit" whereas the
latter is given in "subplot unit".

I find these convention difficult to use when you try, for example, to have:
wspace = left margin + right margin
hspace = top margin + bottom margin

Here is some Python code to be clear:

left_margin, bottom_margin, right_margin, top_margin = 0.06, 0.06, 0, 0.1
pylab.subplots_adjust(
left=left_margin,
bottom=bottom_margin,
right=1-right_margin,
top=1-top_margin,
wspace=left_margin+right_margin,
hspace=bottom_margin+top_margin
)

I tried, but it doesn't work as intended because i guessed wspace and
hspace are a ratio of figure's size, but it seems they are a ratio of
subplot's size, aren't they?

Is it a design choice or just a matter of fact? Do you want to keep it
that way or do you agree to change it?

For example, with R (where I came from), figure's margin and subplot's
margin are expressed in the same unit: inches or "lines" (a unit
corresponding to the height of a line... very useful).

Nicolas Grilly

-
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-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Numeric support broken?

2006-11-10 Thread Edin Salkovic
I'm posting this because of the other thread Darren started.

I managed to reinstall python (and the modules I use) several days ago
and tried again to run matplotlib with Numeric as the default backend,
but got the same error (the same error Darren is getting). Then I
installed numpy, and everything was fixed :)

Best,
Edin

On 10/22/06, Edin Salkovic <[EMAIL PROTECTED]> wrote:
> Unfortunately, I forgot to do it :(
>
> Then, just after sending the message to the list, it sprang to my
> mind. To make it worse, I then mistakenly entered:
> rm -Rf /path/to/site-packages
>
> no matplotlib at the end, and hit enter.
>
> There goes my beautiful Python install. :'(
>
> Is there some switch to setup.py to make it remove the mpl dir or does
> one allways have to do it by hand?
>
> Cheers,
> Edin
>
> On 10/22/06, Darren Dale <[EMAIL PROTECTED]> wrote:
> > Did you try deleting your old mpl directory from site-packages, remove the
> > build directory from you mpl sources, and rebuild from scratch?
> >
> >
> >
> > On Sunday 22 October 2006 6:59 am, Edin Salkovic wrote:
> > > Hi,
> > >
> > > I built and installed the latest matplotlib from SVN.
> > >
> > > When I type:
> > > >>> from pylab import *
> > > >>> plot([1,2,3])
> > >
> > > I get:
> > >
> > > Traceback (most recent call last):
> > >   File "", line 1, in ?
> > >   File "/usr/lib/python2.4/site-packages/matplotlib/pylab.py", line
> > > 2027, in plot
> > > ret =  gca().plot(*args, **kwargs)
> > >   File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line
> > > 2131, in plotself.autoscale_view(scalex=scalex, scaley=scaley)
> > >   File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line
> > > 985, in autoscale_view
> > > self.set_xlim(XL)
> > >   File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line
> > > 1227, in set_xlim
> > > self.viewLim.intervalx().set_bounds(xmin, xmax)
> > > TypeError: only length-1 arrays can be converted to Python scalars.
> > >
> > > I'm using Numeric as numerix. I'm on a Ubuntu box with python 2.4.
> > >
> > > -
> > > 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-devel mailing list
> > > Matplotlib-devel@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
> >
> > --
> > Darren S. Dale, Ph.D.
> > [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-devel mailing list
> > Matplotlib-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
> >
>

-
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-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel