Re: [Matplotlib-users] passing mouse clicks back to a polling application

2007-04-09 Thread Christopher Barker
belinda thom wrote: > For anyone in my boat following this thread, here's what I ended up doing: Thanks for the summary -- it's really nice to find this sort of thing when scanning archives in the future. > I'm sad to hear that its not as easy to use matplotlib to write more > sophisticated app

Re: [Matplotlib-users] passing mouse clicks back to a polling application

2007-04-08 Thread belinda thom
Thanks everyone for the advice. For anyone in my boat following this thread, here's what I ended up doing: Had a stroke of insight and coded the whole thing up (poorly) using maptlotlib w/no polling. In other words, the entire API sat in the mouse click callback function. Lame, yes---especi

Re: [Matplotlib-users] passing mouse clicks back to a polling application

2007-04-06 Thread Christopher Barker
Ken McIvor wrote: > I recommend you play around with > the FloatCanvas demo, then look at the documentation and source code > to get an idea of how fast you can get up and running with it. Thanks for the endorsement, Ken. I will say that while I think FloatCanvas is a good tool for the job,

Re: [Matplotlib-users] passing mouse clicks back to a polling application

2007-04-06 Thread Ken McIvor
On Apr 5, 2007, at 8:41 PM, belinda thom wrote: > > So, how do the above observations relate to John Hunter's > recommendation that I use a timer or idler? It was the reply from > him that led me to think I might be able to come up w/something > that worked w/o too much dorking. My understan

Re: [Matplotlib-users] passing mouse clicks back to a polling application

2007-04-06 Thread massimo sandal
Christopher Barker ha scritto: Matplotlib is a plotting library -- it's not a gui development lib. I'd think about using a tool designed for the job. I don't know what you want the graphics of your game to look like, but depending on that, some suggestions: PyGame -- good for fancy raster gra

Re: [Matplotlib-users] passing mouse clicks back to a polling application

2007-04-05 Thread Fernando Perez
On 4/5/07, belinda thom <[EMAIL PROTECTED]> wrote: > Darn. I am writing this reply as a desperate attempt to make sure > there's not some quick fix to make it work in my specific case; I'm > about ready to give up or try something like Tk, but am running out > of time. We might, alas, have to sett

Re: [Matplotlib-users] passing mouse clicks back to a polling application

2007-04-05 Thread belinda thom
On Apr 5, 2007, at 1:20 PM, Ken McIvor wrote: > On Apr 5, 2007, at 2:14 PM, belinda thom wrote: >> >> I do think its valuable to be able to write a blocking mouse >> function. After your pointer to Timer (which led me to the threading >> Python library) and idle handler (which I didn't find usefu

Re: [Matplotlib-users] passing mouse clicks back to a polling application

2007-04-05 Thread Ken McIvor
On Apr 5, 2007, at 2:14 PM, belinda thom wrote: > > I do think its valuable to be able to write a blocking mouse > function. After your pointer to Timer (which led me to the threading > Python library) and idle handler (which I didn't find useful doc on, > so didn't persue), I came up with the code

Re: [Matplotlib-users] passing mouse clicks back to a polling application

2007-04-05 Thread belinda thom
On Apr 5, 2007, at 6:27 AM, John Hunter wrote: > On 4/5/07, belinda thom <[EMAIL PROTECTED]> wrote: > >> My app needs to look something like this: >> >> -- >> >> create a game and display it in a matplotlib figure >> >> while game not over : >> >> if its player 1's turn, get player 1's va

Re: [Matplotlib-users] passing mouse clicks back to a polling application

2007-04-05 Thread Christopher Barker
Belinda, While I'm sure you can find a way to do what you want with MPL, it sounds like you're really pushing the bounds of what it's designed for. Having been a Matlab user myself, I can see how you've gotten here, but I think you should consider other options. Matplotlib is a plotting librar

Re: [Matplotlib-users] passing mouse clicks back to a polling application

2007-04-05 Thread John Hunter
On 4/5/07, belinda thom <[EMAIL PROTECTED]> wrote: > My app needs to look something like this: > > -- > > create a game and display it in a matplotlib figure > > while game not over : > > if its player 1's turn, get player 1's valid mouse input, > otherwise get player 2's > You need to ge

Re: [Matplotlib-users] passing mouse clicks back to a polling application

2007-04-05 Thread belinda thom
Hi Angus and the Matplotlib community, I'm finally getting around to trying your suggestions, which at first blush seem like they'd do what I want, so THANKS for that! But I'm still running into issues for which I'm uncertain how to proceed. I outline my stumbling blocks below, which have to

Re: [Matplotlib-users] passing mouse clicks back to a polling application

2007-03-23 Thread Angus McMorland
On 24/03/07, belinda thom <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to write a very simple GUI using matplotlib and have > gotten stuck. Hopefully someone out there has done something similar > and can point me on my way. > > First, I should mention that the examples provided with matplotlib

[Matplotlib-users] passing mouse clicks back to a polling application

2007-03-23 Thread belinda thom
Hi, I'm trying to write a very simple GUI using matplotlib and have gotten stuck. Hopefully someone out there has done something similar and can point me on my way. First, I should mention that the examples provided with matplotlib weren't immediately helpful to me, because when I try to ru