Re: [Matplotlib-users] 2 simple ??: program exit w/graph, update graph real-time

2009-05-06 Thread Robert Cimrman
Robert Cimrman wrote: > Hi Ryan, > > Ryan May wrote: >> On Thu, Apr 23, 2009 at 4:16 PM, Esmail wrote: >> >>> Ryan May wrote: Try this: >>> http://matplotlib.sourceforge.net/examples/animation/simple_anim_gtk.html (If not gtk, there are other examples there.) >>> Thanks Ryan,

Re: [Matplotlib-users] 2 simple ??: program exit w/graph, update graph real-time

2009-05-06 Thread Ryan May
On Wed, May 6, 2009 at 7:57 AM, Robert Cimrman wrote: > Robert Cimrman wrote: > > Hi Ryan, > > > > Ryan May wrote: > >> On Thu, Apr 23, 2009 at 4:16 PM, Esmail wrote: > >> > >>> Ryan May wrote: > Try this: > > > >>> > http://matplotlib.sourceforge.net/examples/animation/simple_ani

Re: [Matplotlib-users] 2 simple ??: program exit w/graph, update graph real-time

2009-05-06 Thread william ratcliff
I'd like to see it ;> On Wed, May 6, 2009 at 8:57 AM, Robert Cimrman wrote: > Robert Cimrman wrote: > > Hi Ryan, > > > > Ryan May wrote: > >> On Thu, Apr 23, 2009 at 4:16 PM, Esmail wrote: > >> > >>> Ryan May wrote: > Try this: > > > >>> > http://matplotlib.sourceforge.net/exampl

Re: [Matplotlib-users] 2 simple ??: program exit w/graph, update graph real-time

2009-05-06 Thread Robert Cimrman
Ryan May wrote: > On Wed, May 6, 2009 at 7:57 AM, Robert Cimrman wrote: >> >> Just for the record: Ryan May's example in this thread, that uses pipes, >> inspired me to try pipes as well, instead of queues >> (multiprocessing.Pipe instead of Queue) and the "hanging problem", i.e. >> the problem th

Re: [Matplotlib-users] 2 simple ??: program exit w/graph, update graph real-time

2009-05-06 Thread Robert Cimrman
william ratcliff wrote: I'd like to see it ;> Here you are... r. import time from multiprocessing import Process, Pipe from Queue import Empty import numpy as np import pylab import gobject class ProcessPlotter(object): def __init__(self): self.x = [] self.y = [] def

[Matplotlib-users] Equal decades on loglog axes

2009-05-06 Thread Sebastian Pająk
Hello How can I set decade on log x axis to be equal length to decade on log y axis (physically)? If I make: ax.set_xscale("log") ax.set_yscale("log") ax.set_aspect(1) I get it all wrong, the units are equal, not decades!! I need the same effect as I get in Gnuplot - the square decades: set l

[Matplotlib-users] EllipseCollection

2009-05-06 Thread Thomas Robitaille
Hi, I noticed that it's not possible to specify the position of the ellipses in an EllipseCollection: http://matplotlib.sourceforge.net/api/collections_api.html?highlight=ellipsecollection#matplotlib.collections.EllipseCollection Of course, I can just create a collection of individual Ellipse

Re: [Matplotlib-users] EllipseCollection

2009-05-06 Thread Michael Droettboom
"offsets" is intended to work for this. Is it broken? Cheers, Mike Thomas Robitaille wrote: > Hi, > > I noticed that it's not possible to specify the position of the > ellipses in an EllipseCollection: > > http://matplotlib.sourceforge.net/api/collections_api.html?highlight=ellipsecollection#m

Re: [Matplotlib-users] EllipseCollection

2009-05-06 Thread Thomas Robitaille
Hi Mike, Thanks for pointing this out - I hadn't noticed the offsets argument. I'll try it out! Cheers, Tom On May 6, 2009, at 10:39 AM, Michael Droettboom wrote: > "offsets" is intended to work for this. Is it broken? > > Cheers, > Mike > > Thomas Robitaille wrote: >> Hi, >> >> I noticed t

[Matplotlib-users] Alpha values not preserved with Ellipse and PatchCollection

2009-05-06 Thread Thomas Robitaille
Hello, The following code should produce identical plots, but in the second case the alpha value is ignored: --- import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as mpl from matplotlib.patches import Ellipse from matplotlib.collections import PatchCollection fig = mpl.figure()

Re: [Matplotlib-users] Equal decades on loglog axes

2009-05-06 Thread Jae-Joon Lee
On Wed, May 6, 2009 at 9:49 AM, Sebastian Pająk wrote: > Hello > > How can I set decade on log x axis to be equal length to decade on log > y axis (physically)? > > If I make: > > ax.set_xscale("log") > ax.set_yscale("log") > ax.set_aspect(1) > > I get it all wrong, the units are equal, not decade

[Matplotlib-users] histogram colors

2009-05-06 Thread Guâno
Dears, I was wondering if I can use a custom colortable in a histogram, to get something like this: http://grass.itc.it/grass64/manuals/html64_user/r_surf_gauss_hist.png thanks -- Carlos Henrique Grohmann - Geologist D.Sc. a.k.a. Guano - Linux User #89721 ResearcherID: A-9030-2008 carlos dot

Re: [Matplotlib-users] Equal decades on loglog axes

2009-05-06 Thread Sebastian Pająk
Thanks a lot!. I don't understand it but It works now as it should. 2009/5/6 Jae-Joon Lee : > On Wed, May 6, 2009 at 9:49 AM, Sebastian Pająk wrote: >> Hello >> >> How can I set decade on log x axis to be equal length to decade on log >> y axis (physically)? >> >> If I make: >> >> ax.set_xscale(

[Matplotlib-users] Wxpython, Matplotlib and draw_artist

2009-05-06 Thread Elan Pavlov
Hi, I can't get wxpython to play well with matplotlib and draw_artist. After mucking around quite a bit I think I narrowed it down to the draw_artist function The problem seems to be that draw_artist when working within wxpython (as opposed to a simple mpl window) doesn't remove the old points it p

Re: [Matplotlib-users] histogram colors

2009-05-06 Thread Ryan May
2009/5/6 Carlos "Guâno" Grohmann > Dears, I was wondering if I can use a custom colortable in a > histogram, to get something like this: > > http://grass.itc.it/grass64/manuals/htm/r_surf_gauss_hist.png Not directly, but you

Re: [Matplotlib-users] 2 simple ??: program exit w/graph, update graph real-time

2009-05-06 Thread Ryan May
On Wed, May 6, 2009 at 8:53 AM, Robert Cimrman wrote: > Ryan May wrote: > >> On Wed, May 6, 2009 at 7:57 AM, Robert Cimrman >> wrote: >> >>> >>> Just for the record: Ryan May's example in this thread, that uses pipes, >>> inspired me to try pipes as well, instead of queues >>> (multiprocessing.P

Re: [Matplotlib-users] Equal decades on loglog axes

2009-05-06 Thread Eric Firing
Jae-Joon Lee wrote: > On Wed, May 6, 2009 at 9:49 AM, Sebastian Pająk wrote: >> Hello >> >> How can I set decade on log x axis to be equal length to decade on log >> y axis (physically)? >> >> If I make: >> >> ax.set_xscale("log") >> ax.set_yscale("log") >> ax.set_aspect(1) >> >> I get it all wron

Re: [Matplotlib-users] EllipseCollection

2009-05-06 Thread Eric Firing
Thomas Robitaille wrote: > Hi Mike, > > Thanks for pointing this out - I hadn't noticed the offsets argument. > I'll try it out! See http://matplotlib.sourceforge.net/examples/pylab_examples/ellipse_collection.html Eric > > Cheers, > > Tom > > On May 6, 2009, at 10:39 AM, Michael Droettbo

Re: [Matplotlib-users] Alpha values not preserved with Ellipse and PatchCollection

2009-05-06 Thread Eric Firing
Thomas Robitaille wrote: > Hello, > > The following code should produce identical plots, but in the second > case the alpha value is ignored: > > --- > > import matplotlib > matplotlib.use('Agg') > import matplotlib.pyplot as mpl > from matplotlib.patches import Ellipse > from matplotlib.colle

[Matplotlib-users] Stick Plot?

2009-05-06 Thread Christopher Barker
Hi folks, Has anyone used MPL to make stick plots? If so, can I borrow your code? http://tabs.gerg.tamu.edu/Tglo/RTA/N/Oceanographic_CurrentStick_30.html Thanks, -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206)

[Matplotlib-users] logarithmic scale of colorbar with ticks and custom labels

2009-05-06 Thread Sebastian Pająk
Hello I have a contour plot with specified number of levels (isolines): lev = array([2,3,5,7,10,13,17,21,26,32,42,62,80,100,120,140,180]) to have a log "z" axis I put: from matplotlib import colors contourf(x1, y1, z1, lev, norm=colors.LogNorm(lev[0],lev[len(lev)-1])) now, to get colorbar in l

Re: [Matplotlib-users] Stick Plot?

2009-05-06 Thread Eric Firing
Christopher Barker wrote: > Hi folks, > > Has anyone used MPL to make stick plots? If so, can I borrow your code? > > http://tabs.gerg.tamu.edu/Tglo/RTA/N/Oceanographic_CurrentStick_30.html > > Thanks, > > -Chris > > > Chris, This would be a good addition. It might be implemented nicely b

Re: [Matplotlib-users] Stick Plot?

2009-05-06 Thread Eric Firing
Christopher Barker wrote: > Hi folks, > > Has anyone used MPL to make stick plots? If so, can I borrow your code? > > http://tabs.gerg.tamu.edu/Tglo/RTA/N/Oceanographic_CurrentStick_30.html > > Thanks, > > -Chris > > > Chris, If no one volunteers anything, then I suggest using quiver(...,

Re: [Matplotlib-users] Stick Plot?

2009-05-06 Thread Christopher Barker
Eric Firing wrote: > Christopher Barker wrote: >> Has anyone used MPL to make stick plots? If so, can I borrow your code? > If no one volunteers anything, then I suggest using quiver(..., > headlength=0, headwidth=0, headaxislength=0), together with > quiverkey(...). This will effectively give y

[Matplotlib-users] O pylab why do you refuse to import?

2009-05-06 Thread John Seales
Hi- I'm writing again. I managed to switch my python version to 2.5, and reloaded numpy and matplotlib. Unfortunately, pylab still will not load: >>> import pylab Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/

Re: [Matplotlib-users] O pylab why do you refuse to import?

2009-05-06 Thread Christopher Barker
John Seales wrote: > Hi- I'm writing again. > > I managed to switch my python version to 2.5, and reloaded numpy and > matplotlib. how did you install matplotlib? Unfortunately, pylab still will not load: > ImportError: > dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.

Re: [Matplotlib-users] Stick Plot?

2009-05-06 Thread Eric Firing
Christopher Barker wrote: > Eric Firing wrote: >> Christopher Barker wrote: >>> Has anyone used MPL to make stick plots? If so, can I borrow your code? >> If no one volunteers anything, then I suggest using quiver(..., >> headlength=0, headwidth=0, headaxislength=0), together with >> quiverkey(..

[Matplotlib-users] using MPL and ipython "run" command

2009-05-06 Thread Christopher Barker
Hi all I'm sure this is documented somewhere, but I can't find it. I'm finally getting around to learning ipython, which is pathetic as it sure seems like a great tool. Anyway, I want to be able to have a simple script that does some plotting with MPL, and run it with python's "run". Then chan

Re: [Matplotlib-users] using MPL and ipython "run" command

2009-05-06 Thread Eric Firing
Christopher Barker wrote: > Hi all > > I'm sure this is documented somewhere, but I can't find it. > > I'm finally getting around to learning ipython, which is pathetic as it > sure seems like a great tool. > > Anyway, I want to be able to have a simple script that does some > plotting with MP

Re: [Matplotlib-users] using MPL and ipython "run" command

2009-05-06 Thread Christopher Barker
Eric Firing wrote: >> What am I missing? > > Try "ipython -pylab". oops, sorry -- I'm already doing that. If I don't do that, then the show() command blocks ipython -- that's not happening, I'm just not getting new plots when it's called again. thanks, -Chris > Eric > >> >> example script:

Re: [Matplotlib-users] O pylab why do you refuse to import?

2009-05-06 Thread John Seales
Here's what it says: $ file ft2font.so ft2font.so: Mach-O universal binary with 2 architectures ft2font.so (for architecture i386): Mach-O bundle i386 ft2font.so (for architecture ppc): Mach-O bundle ppc > Date: Wed, 6 May 2009 15:09:57 -0700 > From: chris.bar...@noaa.gov > To: matplot

Re: [Matplotlib-users] O pylab why do you refuse to import?

2009-05-06 Thread John Seales
Here's what it says: $ file ft2font.so ft2font.so: Mach-O universal binary with 2 architectures ft2font.so (for architecture i386): Mach-O bundle i386 ft2font.so (for architecture ppc): Mach-O bundle ppc I installed matplotlib from the dmg file. I clicked on the icon to install

Re: [Matplotlib-users] using MPL and ipython "run" command

2009-05-06 Thread Gökhan SEVER
Hi You may add these two lines: fig = plt.figure() fig.clear() It should give what you want to see. Gökhan On Wed, May 6, 2009 at 6:09 PM, Christopher Barker wrote: > Hi all > > I'm sure this is documented somewhere, but I can't find it. > > I'm finally getting around to learning ipython, w

Re: [Matplotlib-users] Stick Plot?

2009-05-06 Thread Gökhan SEVER
Just for your information: Mayavi has a quiver3d function (http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/auto/mlab_helper_functions.html#quiver3d) if you want to go a fancier way :) This said, I don't know how to hide arrow heads in Mayavi. Also what you showed in your or

Re: [Matplotlib-users] O pylab why do you refuse to import?

2009-05-06 Thread Christopher Barker
note: make sure to include the list, it doesn't look like you did. John Seales wrote: > Here's what it says: > > $ file ft2font.so > ft2font.so: Mach-O universal binary with 2 architectures > ft2font.so (for architecture i386): Mach-O bundle i386 > ft2font.so (for architecture ppc): Mach

Re: [Matplotlib-users] using MPL and ipython "run" command

2009-05-06 Thread Christopher Barker
Gökhan SEVER wrote: > You may add these two lines: > > fig = plt.figure() > fig.clear() I thought I'd tried that (at least I'd tries plt.clf() ), but indeed, that takes care of it. I'm a bit confused as to why that is necessary, but at least it's working for me. thanks, -Chris > It should g

Re: [Matplotlib-users] using MPL and ipython "run" command

2009-05-06 Thread Gökhan SEVER
I am playing with some other commands to achieve updating on the same figure, no luck yet. I guess that is what you actually been trying to see? Update the figure content without opening another one? Gökhan On Wed, May 6, 2009 at 6:58 PM, Christopher Barker wrote: > Gökhan SEVER wrote: >> You

Re: [Matplotlib-users] using MPL and ipython "run" command

2009-05-06 Thread Christopher Barker
Christopher Barker wrote: > Gökhan SEVER wrote: >> You may add these two lines: >> >> fig = plt.figure() >> fig.clear() > > I thought I'd tried that (at least I'd tries plt.clf() ), but indeed, > that takes care of it. I'm a bit confused as to why that is necessary, > but at least it's working f

Re: [Matplotlib-users] Stick Plot?

2009-05-06 Thread Christopher Barker
Gökhan SEVER wrote: > Mayavi has a quiver3d function > (http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/auto/mlab_helper_functions.html#quiver3d) > if you want to go a fancier way :) which is cool, but I"m looking to plot a time series of a (2d) vector quantity at a single

Re: [Matplotlib-users] using MPL and ipython "run" command

2009-05-06 Thread Christopher Barker
Gökhan SEVER wrote: > I am playing with some other commands to achieve updating on the same > figure, no luck yet. > > I guess that is what you actually been trying to see? Update the > figure content without opening another one? right. Christopher Barker wrote: > oops, no it doesn't -- what th

Re: [Matplotlib-users] Stick Plot?

2009-05-06 Thread Gökhan SEVER
To me arrows are always useful to see the direction of wind easily. Since in meteorological convention barbs show where the wind is blowing from, but in pilot convention (I might have made up this one :)) in the opposite way. Gökhan On Wed, May 6, 2009 at 7:11 PM, Christopher Barker wrote: > Gök

Re: [Matplotlib-users] O pylab why do you refuse to import?

2009-05-06 Thread John Seales
I do have X11. It looks like there's a problem with the libfreetype, but I don't understand what the problem is. john-seales-computer:/ johnseales$ file /usr/X11R6/lib/libfreetype.6.dylib /usr/X11R6/lib/libfreetype.6.dylib: cannot open (/usr/X11R6/lib/libfreetype.6.dylib) john-seales-computer

Re: [Matplotlib-users] using MPL and ipython "run" command

2009-05-06 Thread Jae-Joon Lee
Try to put plt.draw() before plt.show(). My guess is that what show() does is to create figure windows, and in most cases it does not redraw the figure (Tk backend is always an exception). So, this may not be a bug. But I hope some who knows well about the backends clarify this. Regards, -JJ

Re: [Matplotlib-users] O pylab why do you refuse to import?

2009-05-06 Thread Joshua Lippai
John, I've seen this problem happen before with someone else; the person's X11 installation for some reason included the file libfreetype.6.3.dylib but not librfreetype.6.3.dylib. Did you install X11 before or after installing the Xcode development tools? Also, if you had to install X11 yourself,