[Matplotlib-users] how to generate one plot per key press?

2009-08-23 Thread Dr. Phillip M. Feldman
The following trivial program is supposed to generate one plot per key press until the user presses 'q'. Instead, nothing is displayed until the user presses 'q'. Any suggestions will be appreciated. from os import sys from matplotlib import * from numpy.random import rand while True: z=

Re: [Matplotlib-users] how to generate one plot per key press?

2009-08-23 Thread Paul Ivanov
Try something like this: from os import sys from matplotlib import * from numpy.random import rand fig= pyplot.figure(figsize=(8,8), dpi=120) pyplot.show() while True: z= rand(20,20) pyplot.imshow(z) pyplot.draw() chr= sys.stdin.read(1) if chr=='q': break

Re: [Matplotlib-users] how to generate one plot per key press?

2009-08-23 Thread Paul Ivanov
appologies - sys.stdin.read(1) blocks until you give it a new line (Enter) that' s probably what you were having problems with. Paul Ivanov, on 2009-08-23 01:14, wrote: Try something like this: from os import sys from matplotlib import * from numpy.random import rand fig=

[Matplotlib-users] Axplot3D in Qt4

2009-08-23 Thread German Ocampo
Good morning I'm working in a project in QT4 and I need to create a 3D graph embedded in a Widget form. Is it possible to do it? and where I could get an example? Thanks German -- Let Crystal Reports handle the

Re: [Matplotlib-users] Create axes instance position relative to another axes instance position??

2009-08-23 Thread Patrick Marsh
Hi JJ, I'm not sure I understand how to properly set the axe_locator. Below is my snippet of code that I use to create my contourf plot and then create the colorbar. I'm unsure how I would modify it to do as you suggested. Any help would be appreciated. plot = ax.contourf(xc, yc,

Re: [Matplotlib-users] how to generate one plot per key press?

2009-08-23 Thread Dr. Phillip M. Feldman
Having to hit Enter is not a major problem, but I'm still not getting anything displayed. I noticed that you used pyplot.draw() instead of pyplot.show(). I've checked the available documentation, but haven't been able to understand the difference between these. I should have mentioned that I'm

Re: [Matplotlib-users] how to generate one plot per key press?

2009-08-23 Thread Sebastian Busch
Dr. Phillip M. Feldman wrote: Having to hit Enter is not a major problem, but I'm still not getting anything displayed. i guess that might be because the show command before the loop blocks the program. you can omit the line with show or start ipython with ipython -pylab both versions work

[Matplotlib-users] how do colormaps work?

2009-08-23 Thread Dr. Phillip M. Feldman
I've been trying to understand how colormaps work. I've been through the Matplotlib User's Guide (Release 0.98.6svn, dated June 14, 2009), but the section on colormaps has not yet been written. If anyone can point me to documentation or provide an explanation, I'd be grateful. -- View this

[Matplotlib-users] Plot rescales the first few clicks - how to disallow overlapping ?

2009-08-23 Thread Ala Al-Shaibani
Hello everyone, I was playing around with matplotlib, created a plot that allows users to add nodes (axis is set off as it's going to be used for graph data structuer purposes, hence don't want the y-x axis, is there another way to hide them as well?). Basically the program below allows

[Matplotlib-users] canvas.Refresh problem with 0.99

2009-08-23 Thread Werner F. Bruhin
I previously used version '0.90.1' and could do something along these lines. figure.add_axes ... etc canvas.Refresh() User makes a new selection and in the code I do: figure.clear() figure.add_axes ... etc canvas.Refresh() With 0.99 and wxAgg on Windows Vista with wxPython 2.8.10.1 Unicode

Re: [Matplotlib-users] canvas.Refresh problem with 0.99 - solved

2009-08-23 Thread Werner F. Bruhin
Werner F. Bruhin wrote: I previously used version '0.90.1' and could do something along these lines. figure.add_axes ... etc canvas.Refresh() User makes a new selection and in the code I do: figure.clear() figure.add_axes ... etc canvas.Refresh() With 0.99 and wxAgg on Windows Vista

Re: [Matplotlib-users] how do colormaps work?

2009-08-23 Thread Eric Firing
Dr. Phillip M. Feldman wrote: I've been trying to understand how colormaps work. I've been through the Matplotlib User's Guide (Release 0.98.6svn, dated June 14, 2009), but the section on colormaps has not yet been written. If anyone can point me to This is my fault; I need to write that.

Re: [Matplotlib-users] how do colormaps work?

2009-08-23 Thread John Hunter
On Sun, Aug 23, 2009 at 1:24 PM, Eric Firingefir...@hawaii.edu wrote: Dr. Phillip M. Feldman wrote: I've been trying to understand how colormaps work.  I've been through the Matplotlib User's Guide (Release 0.98.6svn, dated June 14, 2009), but the section on colormaps has not yet been written.

Re: [Matplotlib-users] pylab (drag_pan )

2009-08-23 Thread marc desmarais
To create a cursor that only pans horizontally, I'm thinking of writing a special version of drag_pan in  backend_bases.py  It would call  drag_pan in axes.py with the key argument set to 'x' Any advice, suggestions? backend_bases.py : def my_drag_pan(self, event):     'the drag callback in

[Matplotlib-users] Interactive navigation toolbar documentation recommendation

2009-08-23 Thread marc desmarais
I just realized that by clicking once on the pan button, the cursor goes into pan, and clicking again, it goes back to the arrow. Same for some of the other buttons.  I realized this by looking at the code.  I would recommend that the documentation at the link shown below say something about

Re: [Matplotlib-users] help needed in plotting curved elements

2009-08-23 Thread Chris Barker
Sameer Regmi wrote: We are working on plotting mesh (in hermes2d: http://hpfem.math.unr.edu/projects/hermes2d-new/) In the hermes2d examples curves are defined as [4, 7, 45] where 4,7 are vertices indices, and 45 is center angle. 1) matplot.path porvides a way to plot curve with three

Re: [Matplotlib-users] help needed in plotting curved elements

2009-08-23 Thread John Hunter
On Sun, Aug 23, 2009 at 7:45 PM, Chris Barkerchris.bar...@noaa.gov wrote: This is a Bezier spline -- it can not exactly form a piece of a circle (though it can get pretty close). You can probably find the math somewhere for how to approximate a circle, but... somewhere like ...

Re: [Matplotlib-users] matplotlib-0.99 font incompatibility?

2009-08-23 Thread Phil Robare
When you have a problem like this with one install looking one place and another install looking in another place making a symbolic link is usually easier and more likely to catch everything than making a copy. In your case you could have said: ln -s