SourceForge logo
SourceForge logo
Menu

matplotlib-devel — matplotlib developers

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
(1)
Nov
(33)
Dec
(20)
2004 Jan
(7)
Feb
(44)
Mar
(51)
Apr
(43)
May
(43)
Jun
(36)
Jul
(61)
Aug
(44)
Sep
(25)
Oct
(82)
Nov
(97)
Dec
(47)
2005 Jan
(77)
Feb
(143)
Mar
(42)
Apr
(31)
May
(93)
Jun
(93)
Jul
(35)
Aug
(78)
Sep
(56)
Oct
(44)
Nov
(72)
Dec
(75)
2006 Jan
(116)
Feb
(99)
Mar
(181)
Apr
(171)
May
(112)
Jun
(86)
Jul
(91)
Aug
(111)
Sep
(77)
Oct
(72)
Nov
(57)
Dec
(51)
2007 Jan
(64)
Feb
(116)
Mar
(70)
Apr
(74)
May
(53)
Jun
(40)
Jul
(519)
Aug
(151)
Sep
(132)
Oct
(74)
Nov
(282)
Dec
(190)
2008 Jan
(141)
Feb
(67)
Mar
(69)
Apr
(96)
May
(227)
Jun
(404)
Jul
(399)
Aug
(96)
Sep
(120)
Oct
(205)
Nov
(126)
Dec
(261)
2009 Jan
(136)
Feb
(136)
Mar
(119)
Apr
(124)
May
(155)
Jun
(98)
Jul
(136)
Aug
(292)
Sep
(174)
Oct
(126)
Nov
(126)
Dec
(79)
2010 Jan
(109)
Feb
(83)
Mar
(139)
Apr
(91)
May
(79)
Jun
(164)
Jul
(184)
Aug
(146)
Sep
(163)
Oct
(128)
Nov
(70)
Dec
(73)
2011 Jan
(235)
Feb
(165)
Mar
(147)
Apr
(86)
May
(74)
Jun
(118)
Jul
(65)
Aug
(75)
Sep
(162)
Oct
(94)
Nov
(48)
Dec
(44)
2012 Jan
(49)
Feb
(40)
Mar
(88)
Apr
(35)
May
(52)
Jun
(69)
Jul
(90)
Aug
(123)
Sep
(112)
Oct
(120)
Nov
(105)
Dec
(116)
2013 Jan
(76)
Feb
(26)
Mar
(78)
Apr
(43)
May
(61)
Jun
(53)
Jul
(147)
Aug
(85)
Sep
(83)
Oct
(122)
Nov
(18)
Dec
(27)
2014 Jan
(58)
Feb
(25)
Mar
(49)
Apr
(17)
May
(29)
Jun
(39)
Jul
(53)
Aug
(52)
Sep
(35)
Oct
(47)
Nov
(110)
Dec
(27)
2015 Jan
(50)
Feb
(93)
Mar
(96)
Apr
(30)
May
(55)
Jun
(83)
Jul
(44)
Aug
(8)
Sep
(5)
Oct
Nov
(1)
Dec
(1)
2016 Jan
Feb
Mar
(1)
Apr
May
Jun
(2)
Jul
Aug
(3)
Sep
(1)
Oct
(3)
Nov
Dec
2017 Jan
Feb
(5)
Mar
Apr
May
Jun
Jul
(3)
Aug
Sep
(7)
Oct
Nov
Dec
2018 Jan
Feb
Mar
Apr
May
Jun
Jul
(2)
Aug
Sep
Oct
Nov
Dec
S M T W T F S
1
2
3
4
5
(2)
6
(2)
7
8
(3)
9
(2)
10
(13)
11
(11)
12
(8)
13
(4)
14
15
16
(2)
17
(2)
18
19
(1)
20
21
22
(3)
23
24
(2)
25
26
(3)
27
(1)
28
(1)
29
(1)
30
(9)
31
(2)




Showing 9 results of 9

From: Gael V. <gae...@no...> - 2006年10月30日 19:59:57
On Mon, Oct 30, 2006 at 12:37:42PM -0700, Fernando Perez wrote:
> Jut to clarify, Gael: in ipython (with -pylab or -{g,w,q}thread), what
> happens is that IPython lets the GUI toolkit run in the main thread,
> and then attaches its own routines for user code execution as the
> toolkit's idle timer callback and runs in a secondary thread (each
> toolkit has its own way of doing this, but the basic idea is the
> same).
OK, similar to launching a wx application and starting a thread in it
with ipython attached to this thread ? Is there a "hook" to the main
eventloop that would be accessible to the code running in ipython. Thus
a wx.CallAfter or alike in different toolkits, and other eventloop and
multi-threaded programming tricks might be useful here. Maybe this
solution would even provide the solution for blocking calls with MPL
with most multi-threaded cases.
The problem I hit in my first attempt was that the "connect" call
executed in my function did not seem to be executed until the function
returned. If I can connect a callback to the figure in the beginning of
the function, then loop waiting and checking a parameter the will be set
be the callback, then process the parameter when available.
I do not see why this could not work, but then my understanding of
multithreaded programming is quite poor.
> This two-thread arrangement has a big drawback: the inability to
> interrupt long-running calculations (even non-blocking ones) with
> Ctrl-C, because it is simply impossible in Python to toss asynchronous
> signals accross threads.=20
Yes :-<. Have you tried getting some help from a guru, it seems to be
worth the while.
Cheers,
Ga=C3l
From: Fernando P. <fpe...@gm...> - 2006年10月30日 19:38:07
On 10/30/06, Gael Varoquaux <gae...@no...> wrote:
> On Mon, Oct 30, 2006 at 10:36:09AM -0800, Christopher Barker wrote:
> > However, perhaps you can take advantage of a similar feature (at least
> > in wx) -- can you make the Frame Modal temporarily? My understanding of
> > how model dialogs work is that they stop the main event loop, and then
> > have their own event loop, for just that frame -- then you could catch
> > the mouse event you want, and make it non-modal again.
>
> I far as I have seen in ipython the execution of a script blocks the
> eventloop. Now in another shell if the shell is not aware of the event
> loop, calling show() will block until the windows is closed (that might be
> a good blocking call for my purpose). This leaves us with the case where
> the shell is a wx shell and lives in the eventloop. A wx guru would
> probably give us the solution here.
Jut to clarify, Gael: in ipython (with -pylab or -{g,w,q}thread), what
happens is that IPython lets the GUI toolkit run in the main thread,
and then attaches its own routines for user code execution as the
toolkit's idle timer callback and runs in a secondary thread (each
toolkit has its own way of doing this, but the basic idea is the
same).
The only blocking that you see comes from blocking code which your
scripts may call (typically extension code, C, Fortran, etc), since at
that point the Python interpreter can't switch out of this secondary
thread. But as long as your scripts do NOT call any extension
blocking code, the Python interpreter will switch out every 100
bytecodes between your user code and the main thread.
This two-thread arrangement has a big drawback: the inability to
interrupt long-running calculations (even non-blocking ones) with
Ctrl-C, because it is simply impossible in Python to toss asynchronous
signals accross threads. And yes, I've tried even using the
undocumented Python C-API for cross-thread asynchronous signals via
this recipe:
http://sebulba.wikispaces.com/recipe+thread2
I spent some time on this, unsuccessfully. I still don't understand
why it doesn't work, since what I'm trying to do seems to be exactly
what that recipe is for. If anyone ever gets this to work, *please*
send it to me. It would be a major usability improvement to get
interruptibility of long computations in the threaded Pylab
environments (GTK, QT and Wx). In fact, this is part of the reason
why I'm resisting a switch to Wx: I really hate not being able to
cleanly stop a computation that is taking longer than I meant, or
which I accidentally started.
Cheers,
f
From: Gael V. <gae...@no...> - 2006年10月30日 18:50:38
On Mon, Oct 30, 2006 at 10:36:09AM -0800, Christopher Barker wrote:
> However, perhaps you can take advantage of a similar feature (at least=20
> in wx) -- can you make the Frame Modal temporarily? My understanding of=
=20
> how model dialogs work is that they stop the main event loop, and then=20
> have their own event loop, for just that frame -- then you could catch=20
> the mouse event you want, and make it non-modal again.
I far as I have seen in ipython the execution of a script blocks the
eventloop. Now in another shell if the shell is not aware of the event
loop, calling show() will block until the windows is closed (that might b=
e
a good blocking call for my purpose). This leaves us with the case where
the shell is a wx shell and lives in the eventloop. A wx guru would
probably give us the solution here.
Now I am probably talking nonsense, as I don't know much about gui and
event loop, but it does look like there might be a solution (and the
chances that I actually implement this are close to zero, given my
knowledge of these things).
 Ga=C3l
From: Christopher B. <Chr...@no...> - 2006年10月30日 18:36:27
Gael Varoquaux wrote:
> I think that for such a blocking call to work, all we would need is a
> way to start and stop the eventloop (I am talking in wx terms, the only
> GUI toolkit I know).
That's a trick, because if you stop the event loop, then you don't get 
the mouse clicks...
However, perhaps you can take advantage of a similar feature (at least 
in wx) -- can you make the Frame Modal temporarily? My understanding of 
how model dialogs work is that they stop the main event loop, and then 
have their own event loop, for just that frame -- then you could catch 
the mouse event you want, and make it non-modal again.
What I don't know is if you can make a Frame model/non-model without 
hiding and showing it in the process...
I also don't know if other toolkits work similarly.
-Chris
-- 
Christopher Barker, Ph.D.
Oceanographer
 		
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
From: Andrew C. <aco...@gm...> - 2006年10月30日 17:17:29
Attachments: Axes3DI.plot3d.diff
I've posted this patch to SF.net. It's a small change to
Axes3DI.autoscale_view brings its interface into conformity with its
parent class. More details on the SF patch.
-Andrew
From: John H. <jdh...@ac...> - 2006年10月30日 14:53:00
>>>>> "Gael" == Gael Varoquaux <gae...@no...> writes:
 Gael> On Mon, Oct 30, 2006 at 08:21:20AM -0600, John Hunter wrote:
 >> blocking calls in pylab with gtk threading may be possible but
 >> it is beyond my powers. I would write this with a callback, eg
 >> create a class that takes a callback in the constructor and
 >> calls the callback after n clicks with a list of n coords.
 Gael> Yes this is the right way of doing this (I have been
 Gael> experimenting a bit yesterday). However have a blocking call
 Gael> would be really nice for casual programmers, like so many
 Gael> physicists, who have no idea what eventloops and threads
 Gael> are.
 Gael> I think that for such a blocking call to work, all we would
 Gael> need is a way to start and stop the eventloop (I am talking
 Gael> in wx terms, the only GUI toolkit I know). That way when a
 Gael> script call ginput the ginput call adds a few callbacks to
 Gael> the canvas (that's the easy part) and starts the
 Gael> eventloop. The callbacks stop the eventloop when the right
 Gael> number of points as been acquired.
 Gael> Now I have no clue if this is possible, but that would
 Gael> certainly make writing small interactive scripts much
 Gael> easier.
Nadia pursued blocking calls for a while and I think she made some
progress. You are right about this model fitting the brain of
physicists better than a callback approach. Maybe Nadia can bring us
up to speed on where she left off.
JDH
From: Gael V. <gae...@no...> - 2006年10月30日 14:45:32
On Mon, Oct 30, 2006 at 08:21:20AM -0600, John Hunter wrote:
> blocking calls in pylab with gtk threading may be possible but it is
> beyond my powers. I would write this with a callback, eg create a
> class that takes a callback in the constructor and calls the callback
> after n clicks with a list of n coords.
Yes this is the right way of doing this (I have been experimenting a bit
yesterday). However have a blocking call would be really nice for casual
programmers, like so many physicists, who have no idea what eventloops
and threads are.
I think that for such a blocking call to work, all we would need is a
way to start and stop the eventloop (I am talking in wx terms, the only
GUI toolkit I know). That way when a script call ginput the ginput call
adds a few callbacks to the canvas (that's the easy part) and starts the
eventloop. The callbacks stop the eventloop when the right number of
points as been acquired.
Now I have no clue if this is possible, but that would certainly make
writing small interactive scripts much easier.
Cheers,
Ga=EBl
From: John H. <jdh...@ac...> - 2006年10月30日 14:24:09
>>>>> "Andrew" == Andrew Colombi <co...@ui...> writes:
 Andrew> My real question is, how do I go about incorporating my
 Andrew> change to matplotlib's source repository. I've already
 Andrew> checked out the latest matplotlib/trunk/matplotlib, and
 Andrew> created a SourceForge account. When I do an svn commit it
 Andrew> doesn't give me permission. How do I get permission? If
 Andrew> someone on this list is responsible for granting write
 Andrew> access then my SF account name is andrewcc and my password
 Andrew> is... just kidding ;-) I'm not that much of a newbie, but
 Andrew> I've never submitted code to an open source project before
 Andrew> (unless you could Wikipedia).
The best way os to post a svn diff to this list and to the sourceforge
site. When you post to this list, post a link to the sf patch so we
can easily close it after we apply it.
JDH
From: John H. <jdh...@ac...> - 2006年10月30日 14:23:24
>>>>> "Gael" == Gael Varoquaux <gae...@no...> writes:
 Gael> For those who have never used matlab, ginput is a blocking
 Gael> call that takes one optional argument n, waits for n click
 Gael> on the current figure, and returns the coordinates of those
 Gael> n clicks. I have been trying to write such a function in
 Gael> pylab and I can't find a solution.
blocking calls in pylab with gtk threading may be possible but it is
beyond my powers. I would write this with a callback, eg create a
class that takes a callback in the constructor and calls the callback
after n clicks with a list of n coords. blocking input calls may be
easier in tkagg. If there is a gtk/threading guru on hand, I'd be
interested if anyone has ideas on how to do this.
JDH

Showing 9 results of 9

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /