Re: [Matplotlib-users] bug?

2006-07-11 Thread Eric Firing
An rgb colorspec in matplotlib must be a sequence of three numbers 
between zero and one, so the problem is that you are indeed giving an 
invalid rgb arg.

I think perhaps you grabbed an error message from a different instance 
of this error; when I try it, I get an error message that correctly 
gives the invalid arg that was supplied:

ValueError: to_rgb: Invalid rgb arg (120, 120, 120)
to_rgb: Invalid rgb arg (120, 120, 120)


Eric

[EMAIL PROTECTED] wrote:
 Hello, I have a problem with the svn version of matplotlib. I don't know when 
 this problem appeared but it was working before.
 
 so the next script gave me an error message: 
 
 
 import pylab
 
 p = pylab.plot([1,2],[2,3],'o')
 pylab.setp(p,markerfacecolor=(120,120,120),markersize=5,markeredgewidth=1.,zorder=50)
 
 pylab.show()
 
 the main error message is:
 
 ValueError: to_rgb: Invalid rgb arg (10.0, 10.0, 10.0)
 to_rgb: Invalid rgb arg (10.0, 10.0, 10.0)
 
 but I don't understand why.
 
 N.
 
 
 -
 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=lnkkid=120709bid=263057dat=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=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Improved dashing for black and white plots?

2006-07-11 Thread Gary Ruben
On this topic, here is something I used the other day (just some 
different dash sequences):

e, = plot(x, y, 'k', label=r'$\theta_3=%1.2f$'%(th3))
setp(e, dashes={0:(1,0), 1:(2,2), 2:(10,4), 3:(10,4,4,4), 4:(10,2,2,2), 
5:(15,2,6,2)}[i])

Maybe we should just blatantly copy the gnuplot sequence, although the 
sequence might be gpl'ed!
One question which arises is that it wasn't clear what to set dashes to 
to get a solid line. I ended up doing the 0: case above i.e. (1,0), but 
I suspect this isn't ideal because it might generate lots of unwanted 
line segments. I think I tried None and (1) and it didn't work. Perhaps 
(999,0) would be better?

Gary R.


-
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=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Install

2006-07-11 Thread Brice Thurin
Dear All,

i was wondering if they are a binary package for matplotlib for 
macos10.3 with python2.4, and the last version of numpy. The one i 
found is only the 0.82 and required numeric.
Or do i have to build from source.

I am a bit confused as the last source file still talk about numeric 
and numarray.

Thanks for your help

Brice



-
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=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] EPS fails to open in Adobe Illustrator

2006-07-11 Thread Darren Dale
On Tuesday 11 July 2006 01:22, Andrew Straw wrote:
 Darren Dale wrote:
  Hi Andrew,
 
  On Monday 10 July 2006 8:19 pm, Andrew Straw wrote:
  Where should I start trying to debug an issue where Adobe Illustrator CS
  for Windows is unable to open my EPS file generated by matplotlib? When
  attempting to open the file, a a dialog pops up that says, The
  operation cannot complete because of an unknown error. So much for
  informative error messages. Ghostview 3.6.1 can read the file just fine,
  and Acrobat Distiller 7.0 for windows can also convert it to a PDF just
  fine. FWIW, I'm using matplotlib.rc('ps',usedistiller=None), but I get
  similar problems setting usedistiller='xpdf'.
 
  I'm basically an EPS file newbie, so don't be afraid to give me the
  equivalent of did you make sure the power switch is turned on.
 
  I have a feeling its a problem with the font handling. I cant open a file
  in inkscape either, the image looks fine but the fonts are missing. Try
  setting ps.usedistiller = ghostscript. That converts the file to
  low-level postscript, which CS should definitely be able to open. It
  worked for inkscape, at least.

 Hi Darren,

 Hmm, that didn't do it. 

That is really surprising to me. How is it that Inkscape can open a postscript 
file and Adobe's own software can not?

 Simple plots (like simple_plot.py) work with no 
 distiller step, so it must be something about my more complex plot.
 Unfortunately, it's a rather complex menagerie of code that produces the
 plot so I'm afraid that if I want to narrow this down, it'll be rather
 painful and slow going. I might just stick with the
 MPL-EPS-Distiller-PDF-Illustrator toolchain, which seems to work for
 the moment.

If you get time, you might edit the postscript file by hand and comment out 
large sections of the code, and try importing those modified files.


-
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=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] order of drawing a plot

2006-07-11 Thread humufr
you can use the zorder option:

plot(x_line,y_line,zorder=10)
scatter(x_point,y_point,zorder=12)


N.

Le mardi 11 juillet 2006 14:48, aonghus a écrit :
 Hi,

 I would like to draw a line, and then draw some points
 on top of the line, so I try something like

  plot(x_line, y_line, ...)
  scatter(x_point, y_point)

 but in the resulting plot it seems the points are
 drawn first and the lines drawn over them (so they are
 obscured).

 How do I specify the order in which the drawing should
 take place?

 thanks,

 a



 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around
 http://mail.yahoo.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=lnkkid=120709bid=263057dat=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=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Improved dashing for black and white plots?

2006-07-11 Thread Fernando Perez
On 7/11/06, Gary Ruben [EMAIL PROTECTED] wrote:
 On this topic, here is something I used the other day (just some
 different dash sequences):

 e, = plot(x, y, 'k', label=r'$\theta_3=%1.2f$'%(th3))
 setp(e, dashes={0:(1,0), 1:(2,2), 2:(10,4), 3:(10,4,4,4), 4:(10,2,2,2),
 5:(15,2,6,2)}[i])

Thanks for these.  In playing with this, both for my needs and to try
and contribute something for a permanent solution, I found something
really strange.  Try running the following code in pylab:

Simple dashing test.

import numpy as N
import pylab as P

dashes= { 0:(1,0),
  1:(2,2),
  2:(10,4),
  3:(10,4,4,4),
  4:(10,2,2,2),
  5:(15,2,6,2) }

y = N.ones(10)+N.rand(10)

P.figure()

dashnums = dashes.keys()
dashnums.sort()
for d in dashnums:
P.plot(y,dashes=dashes[d])
# Bug??? Using this, nothing gets displayed:
y += 1
# But with this, it works fine:
#y = y+1

P.show()
# EOF


Uncomment the 'y=y+1' option, and all works fine.  Here's where the
problem may be coming from, just try this in a terminal:

y = 1.0*arange(10)
plot(y)
y += rand(10)
show()

There are actually two issues here, one is definitely a bug, the other
one could be construed as a feature (albeit a surprising one):

- bug: that the script above doesn't display anything with current
SVN.  I don't know why.

- feature?: that mpl holds on to the actual numpy memory buffer, so if
an array is modified in-place, any subsequent window update will
modify the plot.  I can actually see this being quite useful for
monitoring a region of memory, though it can cause surprising behavior
if you are just trying to get successive plots.  I guess I'm squarely
+1/-1 on how much I like it :)

I'll work a bit more on the dashing and send something later...

Cheers, and thanks for the hints!

f


-
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=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Improved dashing for black and white plots?

2006-07-11 Thread Fernando Perez

On 7/10/06, John Hunter [EMAIL PROTECTED] wrote:

 Fernando == Fernando Perez [EMAIL PROTECTED] writes:

Fernando Hi all, this is somewhat of a half-feature request,
Fernando half-question.  I just went through a rather unpleasant
Fernando exercise in trying to get a line plot with about 8
Fernando traces generated for black and white printing.  As it
Fernando turns out, mpl seems to only have 4 line styles ('-',
Fernando '--', '-.', ':'), which isn't really a whole lot
Fernando (compare this to gnuplot's extensive dashing support).

Are you aware of the dashes property, which allows you to set the
exact dash pattern you want.  It's an arbitrary length sequence of
alternating ink-on, ink-off, in points


In my humble defense, the fact that this is barely mentioned in the
pylab tutorial, not at all in the plot docstring, and also not in
Perry's tutorial, may have something to do with my not knowing about
it ;)


# 5 points on, 2 off, 10 on, 5 off)
plot(arange(20), '--', dashes=[5,2,10,5])

Fernando Additionally, I'd like to suggest having a b/w mode,
Fernando where mpl's auto-selection of different colors for
Fernando successive line plots becomes a rotation of dashing
Fernando modes.  Gnuplot's EPS backend has exactly this feature,

This seems like a good idea -- if you define a nice sequence of dashes
you want to cycle through, I'll build the rest of the infrastructure
and make a figure property like iscolor.


Here's a specific, backwards-compatible proposal: why not add a new
format string type, '-N', with N running 0-9, and '-0' being identical
to a '-' (i.e., a continuous line).  I think that having easy access
to continuous plus 9 dashing patterns should be enough for most
purposes (a plot with more than 10 traces on it is just unreadable
anyway).  This mode also makes it code-friendly, so that one can
easily select any of the patterns with code of the type

 '-%s' % n

where n is being looped over, or a key from a dict, whatever.

I'm not quite sure what the best 9 patterns should be, so I'm
attaching a script to make it  easy to test a bunch of them in a
hurry.  This can help us find 9 distinctive ones (the gnuplot ones are
good, but I think we can do better), to put them into this basic list.
The little script can also be added to the examples dir to showcase
the 9 basic patterns once selected (and you can make a figure for the
tutorial with it :)

Cheers,

f


dashes.py
Description: Binary data

-
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=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] ANN: matplotlib-0.87.4 (bugfix release for enthon)

2006-07-11 Thread Charlie Moad
On 7/7/06, John Hunter [EMAIL PROTECTED] wrote:

 We'd like to do a bugfix release for the next release of enthought
 python, which will include the latest mpl.  Apparently, there is a
 problem with 0.87.3 and numpy which has been fixed in svn.

 If there is anything we should wait on, let us know, otherwise we'll
 probably try to roll out 0.87.4 early next week.

 Thanks,
 JDH

http://cheeseshop.python.org/pypi/matplotlib/
http://sourceforge.net/project/showfiles.php?group_id=80706

===
2006-07-11 Released 0.87.4 at revision 2558

2006-07-07 Fixed a usetex bug with older versions of latex - DSD

2006-07-07 Add compatibility for NumPy 1.0 - TEO

2006-06-29 Added a Qt4Agg backend. Thank you James Amundson - DSD

2006-06-26 Fixed a usetex bug. On windows, usetex will prcess
   postscript output in the current directory rather than
   in a temp directory. This is due to the use of spaces
   and tildes in windows paths, which cause problems with
   latex. The subprocess module is no longer used. - DSD

2006-06-22 Various changes to bar(), barh(), and hist().
   Added 'edgecolor' keyword arg to bar() and barh().
   The x and y args in barh() have been renamed to width
   and bottom respectively, and their order has been swapped
   to maintain a (position, value) order ala matlab. left,
   height, width and bottom args can now all be scalars or
   sequences. barh() now defaults to edge alignment instead
   of center alignment. Added a keyword arg 'align' to bar(),
   barh() and hist() that controls between edge or center bar
   alignment. Fixed ignoring the rcParams['patch.facecolor']
   for bar color in bar() and barh(). Fixed ignoring the
   rcParams['lines.color'] for error bar color in bar()
   and barh(). Fixed a bug where patches would be cleared
   when error bars were plotted if rcParams['axes.hold']
   was False. - MAS

2006-06-22 Added support for numerix 2-D arrays as alternatives to
   a sequence of (x,y) tuples for specifying paths in
   collections, quiver, contour, pcolor, transforms.
   Fixed contour bug involving setting limits for
   color mapping.  Added numpy-style all() to numerix. - EF

2006-06-20 Added custom FigureClass hook to pylab interface - see
   examples/custom_figure_class.py

2006-06-16 Added colormaps from gist (gist_earth, gist_stern,
   gist_rainbow, gist_gray, gist_yarg, gist_heat, gist_ncar) - JW

2006-06-16 Added a pointer to parent in figure canvas so you can
   access the container with fig.canvas.manager.  Useful if
   you want to set the window title, eg in gtk
   fig.canvas.manager.window.set_title, though a GUI neutral
   method would be preferable JDH

2006-06-16 Fixed colorbar.py to handle indexed colors (i.e.,
   norm = no_norm()) by centering each colored region
   on its index. - EF

2006-06-15 Added scalex and scaley to Axes.autoscale_view to support
   selective autoscaling just the x or y axis, and supported
   these command in plot so you can say plot(something,
   scaley=False) and just the x axis will be autoscaled.
   Modified axvline and axhline to support this, so for
   example axvline will no longer autoscale the y axis. JDH

2006-06-13 Fix so numpy updates are backward compatible - TEO

2006-06-12 Updated numerix to handle numpy restructuring of
   oldnumeric - TEO

2006-06-12 Updated numerix.fft to handle numpy restructuring
   Added ImportError to numerix.linear_algebra for numpy -TEO

2006-06-11 Added quiverkey command to pylab and Axes, using
   QuiverKey class in quiver.py.  Changed pylab and Axes
   to use quiver2 if possible, but drop back to the
   newly-renamed quiver_classic if necessary.  Modified
   examples/quiver_demo.py to illustrate the new quiver
   and quiverkey.  Changed LineCollection implementation
   slightly to improve compatibility with PolyCollection. - EF

2006-06-11 Fixed a usetex bug for windows, running latex on files
   with spaces in their names or paths was failing - DSD

2006-06-09 Made additions to numerix, changes to quiver to make it
   work with all numeric flavors. - EF

2006-06-09 Added quiver2 function to pylab and method to axes,
   with implementation via a Quiver class in quiver.py.
   quiver2 will replace quiver before the next release;
   it is placed alongside it initially to facilitate
   testing and transition. See also
   examples/quiver2_demo.py. - EF

2006-06-08 Minor bug fix to make ticker.py draw proper minus signs
   with usetex - DSD


-
Using Tomcat but need to do 

Re: [Matplotlib-users] ANN: matplotlib-0.87.4 (bugfix release for enthon)

2006-07-11 Thread imcs ee
what about the mplot3d. (http://www.scipy.org/Cookbook/Matplotlib/mplot3D)
it works nice under matplotlib0.86.2
but it can't work under matplotlib 0.87.3(with numpy or numeric).

On 7/12/06, Charlie Moad [EMAIL PROTECTED] wrote:
 On 7/7/06, John Hunter [EMAIL PROTECTED] wrote:
 
  We'd like to do a bugfix release for the next release of enthought
  python, which will include the latest mpl.  Apparently, there is a
  problem with 0.87.3 and numpy which has been fixed in svn.
 
  If there is anything we should wait on, let us know, otherwise we'll
  probably try to roll out 0.87.4 early next week.
 
  Thanks,
  JDH

 http://cheeseshop.python.org/pypi/matplotlib/
 http://sourceforge.net/project/showfiles.php?group_id=80706

 ===
 2006-07-11 Released 0.87.4 at revision 2558

 2006-07-07 Fixed a usetex bug with older versions of latex - DSD

 2006-07-07 Add compatibility for NumPy 1.0 - TEO

 2006-06-29 Added a Qt4Agg backend. Thank you James Amundson - DSD

 2006-06-26 Fixed a usetex bug. On windows, usetex will prcess
   postscript output in the current directory rather than
   in a temp directory. This is due to the use of spaces
   and tildes in windows paths, which cause problems with
   latex. The subprocess module is no longer used. - DSD

 2006-06-22 Various changes to bar(), barh(), and hist().
   Added 'edgecolor' keyword arg to bar() and barh().
   The x and y args in barh() have been renamed to width
   and bottom respectively, and their order has been swapped
   to maintain a (position, value) order ala matlab. left,
   height, width and bottom args can now all be scalars or
   sequences. barh() now defaults to edge alignment instead
   of center alignment. Added a keyword arg 'align' to bar(),
   barh() and hist() that controls between edge or center bar
   alignment. Fixed ignoring the rcParams['patch.facecolor']
   for bar color in bar() and barh(). Fixed ignoring the
   rcParams['lines.color'] for error bar color in bar()
   and barh(). Fixed a bug where patches would be cleared
   when error bars were plotted if rcParams['axes.hold']
   was False. - MAS

 2006-06-22 Added support for numerix 2-D arrays as alternatives to
   a sequence of (x,y) tuples for specifying paths in
   collections, quiver, contour, pcolor, transforms.
   Fixed contour bug involving setting limits for
   color mapping.  Added numpy-style all() to numerix. - EF

 2006-06-20 Added custom FigureClass hook to pylab interface - see
   examples/custom_figure_class.py

 2006-06-16 Added colormaps from gist (gist_earth, gist_stern,
   gist_rainbow, gist_gray, gist_yarg, gist_heat, gist_ncar) - JW

 2006-06-16 Added a pointer to parent in figure canvas so you can
   access the container with fig.canvas.manager.  Useful if
   you want to set the window title, eg in gtk
   fig.canvas.manager.window.set_title, though a GUI neutral
   method would be preferable JDH

 2006-06-16 Fixed colorbar.py to handle indexed colors (i.e.,
   norm = no_norm()) by centering each colored region
   on its index. - EF

 2006-06-15 Added scalex and scaley to Axes.autoscale_view to support
   selective autoscaling just the x or y axis, and supported
   these command in plot so you can say plot(something,
   scaley=False) and just the x axis will be autoscaled.
   Modified axvline and axhline to support this, so for
   example axvline will no longer autoscale the y axis. JDH

 2006-06-13 Fix so numpy updates are backward compatible - TEO

 2006-06-12 Updated numerix to handle numpy restructuring of
   oldnumeric - TEO

 2006-06-12 Updated numerix.fft to handle numpy restructuring
   Added ImportError to numerix.linear_algebra for numpy -TEO

 2006-06-11 Added quiverkey command to pylab and Axes, using
   QuiverKey class in quiver.py.  Changed pylab and Axes
   to use quiver2 if possible, but drop back to the
   newly-renamed quiver_classic if necessary.  Modified
   examples/quiver_demo.py to illustrate the new quiver
   and quiverkey.  Changed LineCollection implementation
   slightly to improve compatibility with PolyCollection. - EF

 2006-06-11 Fixed a usetex bug for windows, running latex on files
   with spaces in their names or paths was failing - DSD

 2006-06-09 Made additions to numerix, changes to quiver to make it
   work with all numeric flavors. - EF

 2006-06-09 Added quiver2 function to pylab and method to axes,
   with implementation via a Quiver class in quiver.py.
   quiver2 will replace quiver before the next release;
   it is placed alongside it initially to facilitate
   testing and