[Matplotlib-users] Open file dialog?

2009-06-04 Thread jorgesmbox-ml
Hi, I am working on scripts using numpy, scipy and matplotlib to analyze some image data. I would like to be able to select the particular image I want to analyze, so I need a file selection dialog or similar. I know this can be done with any gui toolkit, but I was wondering if there isn't an

[Matplotlib-users] one data set, two y axis scales

2009-06-04 Thread musik
Hi everyone, Suppose I have the following data set - Time Temperature (F) 1 78 2 79 3 79 4 77 - I want to make a plot with both y axes labeled. The one on the left (y1) will be in Fahrenheit,

Re: [Matplotlib-users] one data set, two y axis scales

2009-06-04 Thread Sandro Tosi
Hi, On Thu, Jun 4, 2009 at 06:56, musik xi.xiaoxi...@gmail.com wrote: I want to make a plot with both y axes labeled. The one on the left (y1) will be in Fahrenheit,  while the one on the right (y2) in Celsius. Is there a way to do this? what you're looking for is [1] [1]

Re: [Matplotlib-users] Reliefplot (imshow with shading)

2009-06-04 Thread Jeff Whitaker
Kilian Koepsell wrote: Hi Jeff, I hope it is ok to contact you directly with this bug report -- feel free to reply to the list if appropriate. I found your previous posting through a web search, http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg10637.htmland then

Re: [Matplotlib-users] Open file dialog?

2009-06-04 Thread Alan G Isaac
On 6/4/2009 3:59 AM jorgesmbox...@yahoo.es apparently wrote: I need a file selection dialog or similar Tkinter makes this pretty easy. E.g., import tkFileDialog as fd fname = fd.askopenfilename(initialdir='c:/temp') fname 'C:/temp/note.jpg' That's all, as long as you don't

[Matplotlib-users] matplotlib and qtdesigner

2009-06-04 Thread Christophe Dupre
Hello there, This is my first post, so first of all, thanks to the creators/contributors of matplotlib. It's a very nice software. I've been developping an application using PyQT and matplotlib for a while now, and instead of coding the GUI, I'd like to make use of QT designer. Does

[Matplotlib-users] qt4: Transforming to display coordinates

2009-06-04 Thread Ole Streicher
Hi, I want to implement a cursor on a diagram using native Qt routines. For this, I would need to transform data (axis) coordinates to display coordinates. The manual of matplotlib, API axes just jays that there are some public attributes 'transData' and 'transAxis', but without an explanation.

[Matplotlib-users] Get coordinates at moouse position

2009-06-04 Thread Ole Streicher
Hi again, when I scroll or zoom with the mouse wheel, the scaling of the x and y axes are changed within the event. I would need now the new value of these to update the status bar. How can I get them without waiting for a new mouse event? Cheers Ole

Re: [Matplotlib-users] Get coordinates at moouse position

2009-06-04 Thread John Hunter
On Thu, Jun 4, 2009 at 9:00 AM, Ole Streicher ole-usenet-s...@gmx.net wrote: Hi again, when I scroll or zoom with the mouse wheel, the scaling of the x and y axes are changed within the event. I would need now the new value of these to update the status bar. How can I get them without waiting

Re: [Matplotlib-users] qt4: Transforming to display coordinates

2009-06-04 Thread John Hunter
On Thu, Jun 4, 2009 at 8:49 AM, Ole Streicher ole-usenet-s...@gmx.net wrote: setParent(parent) self.mpl_connect('motion_notify_event', self.on_move) def on_move(self, event) mouse_pos_diag_x = ???(event.xdata) mouse_pos_diag_y = ???(event.ydata)

Re: [Matplotlib-users] qt4: Transforming to display coordinates

2009-06-04 Thread Ole Streicher
Hi John, thank you four your helpful answer. John Hunter jdh2...@gmail.com writes: On Thu, Jun 4, 2009 at 8:49 AM, Ole Streicher ole-usenet-s...@gmx.net wrote: def on_move(self, event) mouse_pos_diag_x = ???(event.xdata) mouse_pos_diag_y = ???(event.ydata) where I would

Re: [Matplotlib-users] one data set, two y axis scales

2009-06-04 Thread Ryan May
On Thu, Jun 4, 2009 at 6:01 AM, Sandro Tosi matrixh...@gmail.com wrote: Hi, On Thu, Jun 4, 2009 at 06:56, musik xi.xiaoxi...@gmail.com wrote: I want to make a plot with both y axes labeled. The one on the left (y1) will be in Fahrenheit, while the one on the right (y2) in Celsius. Is

Re: [Matplotlib-users] qt4: Transforming to display coordinates

2009-06-04 Thread John Hunter
On Thu, Jun 4, 2009 at 9:26 AM, Ole Streicher ole-usenet-s...@gmx.net wrote: But to answer your question about matplotlib transforms. You could do ax = event.inaxes # the axes the event occurred in x, y = ax.transData.transform_point((event.xdata, event.ydata)) Yes: xdata, ydata =

Re: [Matplotlib-users] Get coordinates at moouse position

2009-06-04 Thread Ole Streicher
Hi John, John Hunter jdh2...@gmail.com writes: On Thu, Jun 4, 2009 at 9:00 AM, Ole Streicher ole-usenet-s...@gmx.net wrote: when I scroll or zoom with the mouse wheel, the scaling of the x and y axes are changed within the event. I would need now the new value of these to update the status

Re: [Matplotlib-users] one data set, two y axis scales

2009-06-04 Thread musik
Exactly. I want to plot the original data once, but the two y axes show different scales (units). Is twinx() good for that? How? Thanks. Ryan May-3 wrote: On Thu, Jun 4, 2009 at 6:01 AM, Sandro Tosi matrixh...@gmail.com wrote: Hi, On Thu, Jun 4, 2009 at 06:56, musik

Re: [Matplotlib-users] matplotlib and qtdesigner

2009-06-04 Thread projetmbc
Christophe Dupre a écrit : I've been developping an application using PyQT and matplotlib for a while now, and instead of coding the GUI, I'd like to make use of QT designer. Hello, I'm interested by your code or simple parts of it wich show intercation between PyQt and matplotilib. Best

Re: [Matplotlib-users] one data set, two y axis scales

2009-06-04 Thread Ryan May
On Thu, Jun 4, 2009 at 10:08 AM, musik xi.xiaoxi...@gmail.com wrote: Exactly. I want to plot the original data once, but the two y axes show different scales (units). Is twinx() good for that? How? I wouldn't call it good, but you can make it work. Basically, you'd plot your data once in F,

Re: [Matplotlib-users] one data set, two y axis scales

2009-06-04 Thread Jae-Joon Lee
I hope the code below gives you some idea. def Tc(Tf): return (5./9.)*(Tf-32) ax1 = subplot(111) # y-axis in F ax2 = twinx() # y-axis in C def update_ax2(ax1): y1, y2 = ax1.get_ylim() ax2.set_ylim(Tc(y1), Tc(y2)) # automatically update ylim of ax2 when ylim of ax1 changes.

[Matplotlib-users] change the subplots

2009-06-04 Thread Markus Feldmann
Hi All, i want to change my subplots sometimes, but how to do this ? I am adding subplots with this command: self.subplot1 = self.figure.add_subplot(211) Deleting axes with(as i read in this mailing list): [self.figure.delaxes(a) for a in self.figure.get_axes()] but then i can not show up my

Re: [Matplotlib-users] matplotlib and qtdesigner

2009-06-04 Thread Pierre Raybaut
matplotlib-users-requ...@lists.sourceforge.net a écrit : Message: 3 Date: Thu, 4 Jun 2009 08:01:06 -0500 From: Christophe Dupre christophe.du...@vhayu.com Subject: [Matplotlib-users] matplotlib and qtdesigner To: matplotlib-users@lists.sourceforge.net Message-ID:

[Matplotlib-users] custom navigation toolbar

2009-06-04 Thread Guâno
Hello all I'm trying to add a custom button in the navigation toolbar for a wx app. so far, I can add the button, but can't get it to work. here is a snippet of the code (the classes are in the same file): #custom matplotlib navigation toolbar #from:

Re: [Matplotlib-users] one data set, two y axis scales

2009-06-04 Thread Ryan May
On Thu, Jun 4, 2009 at 12:16 PM, Jae-Joon Lee lee.j.j...@gmail.com wrote: I hope the code below gives you some idea. def Tc(Tf): return (5./9.)*(Tf-32) ax1 = subplot(111) # y-axis in F ax2 = twinx() # y-axis in C def update_ax2(ax1): y1, y2 = ax1.get_ylim() ax2.set_ylim(Tc(y1),

Re: [Matplotlib-users] one data set, two y axis scales

2009-06-04 Thread musik
This works nicely. Thank you JJ. Jae-Joon Lee wrote: I hope the code below gives you some idea. def Tc(Tf): return (5./9.)*(Tf-32) ax1 = subplot(111) # y-axis in F ax2 = twinx() # y-axis in C def update_ax2(ax1): y1, y2 = ax1.get_ylim() ax2.set_ylim(Tc(y1), Tc(y2))

[Matplotlib-users] Setting axis range so it is not rescaled

2009-06-04 Thread citronade
I am trying to set the x and y axis range on a log-log plot. The ranges I give are automatically adjusted to the nearest power of 10, but I would like to have the minimum and maximum axis values not be powers of 10. Is there a way to set the axis range so that it is not automatically rescaled? --

Re: [Matplotlib-users] Setting axis range so it is not rescaled

2009-06-04 Thread Sandro Tosi
Hi, On Thu, Jun 4, 2009 at 23:26, citronade ricit...@mac.com wrote: I am trying to set the x and y axis range on a log-log plot. The ranges I give are automatically adjusted to the nearest power of 10, but I would like to have the minimum and maximum axis values not be powers of 10. Is there

[Matplotlib-users] Beginning Python Visualization??

2009-06-04 Thread Esmail
Hi, Beginning Python Visualization: Crafting Visual Transformation Scripts by Shai Vaingast http://www.amazon.com/Beginning-Python-Visualization-Transformation-Professionals/dp/1430218436/ref=sr_1_1?ie=UTF8s=booksqid=1244158389sr=8-1 Has anyone seen/read this book? I am looking for a good

Re: [Matplotlib-users] Beginning Python Visualization??

2009-06-04 Thread John Hunter
On Thu, Jun 4, 2009 at 6:48 PM, Esmail ebo...@hotmail.com wrote: Hi, Beginning Python Visualization: Crafting Visual Transformation Scripts by Shai Vaingast

Re: [Matplotlib-users] Beginning Python Visualization??

2009-06-04 Thread Brian Blais
On Jun 4, 2009, at 19:48 , Esmail wrote: Someone recently generously shared this code with me on the python since I was the one to share this with you, I might be able to answer a couple questions. :) list. While I have used pylab/matplotlib a bit, I didn't know about ion() (line 12),