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
(10)
2
(4)
3
(11)
4
(4)
5
(6)
6
(8)
7
(7)
8
(9)
9
(6)
10
11
12
(7)
13
(6)
14
(18)
15
(13)
16
(7)
17
(15)
18
(1)
19
20
(1)
21
(2)
22
(5)
23
(3)
24
(4)
25
(1)
26
27
(8)
28
(2)
29
(5)
30


Showing 18 results of 18

From: Benjamin R. <ben...@ou...> - 2010年09月14日 19:57:53
On Tue, Sep 14, 2010 at 1:58 PM, Fernando Perez <fpe...@gm...>wrote:
> On Tue, Sep 14, 2010 at 11:48 AM, Anne Archibald
> <aar...@ph...> wrote:
> > On 14 September 2010 11:08, Gökhan Sever <gok...@gm...> wrote:
> >
> >> 1-) When one downloads a script from the matplotlib gallery via an
> external
> >> script (name it load_into_ipython or open_with_ipython) the contents of
> that
> >> gallery script (or any python script) can be executed locally inside an
> >> ipython session.
> >
> > Not to be difficult, but I should point out that allowing users to run
> > code with one click, particularly if that code is from a wiki or other
> > user-submitted gallery, is just asking for trouble. How long before
> > someone submits "import os, shutil;
> > shutil.deltree(os.environ['HOME'])"? Or sneaks it into some otherwise
> > inoffensive script?
>
> Very valid points. I'm leaning more towards something like a
> combination of (hopefully) a 'copy code' button on the MPL webpages
> themselves, so users don't have to scroll/highlight a lot but would
> still do paste, execute manually, and a special %mplexample magic.
>
> This would only run examples from the mpl gallery (hardcoding the
> path), would display the code to the user first, and would ask for
> confirmation before execution. Since those html pages are built by
> executing those same scripts, there's a layer of sanity already built
> into it (the rmtree call would have already nuked the builder's home
> directory in the build process if it had been there). Showing the
> code to the user and confirming execution before proceeding adds a
> final chance for the person to check her parachute before jumping off
> the cliff.
>
> Does that sound reasonable?
>
> >> 2-) Matplotlib gallery might turn to an interactive environment where
> you
> >> can execute the script from right within your browser and change
> parameters
> >> in the same browser window. As far as I know mpl figures can now be
> drawn on
> >> html canvas. This might for sure boost the number of matplotlib
> audience.
> >
> > Is there a sandboxed browser plugin? Or server plugin, depending on
> > where you run the script?
>
> This would have to be server-side, and code needs to be written. Part
> of our interest with this explicit separation of ipython kernel and
> clients with a well-defined protocol is to make the above possible.
> But we haven't written any of the code necessary to have a browser
> client, and to serve code read from a sphinx-generated HTML page.
> Gokhan, your patches will be welcome, the infrastructure is now ready
> and waiting for you :)
>
> Cheers,
>
> f
>
Just a crazy idea to consider that would completely bypass this whole
vulnerability issue...
Why not have an examples module that contains function calls to each
example? On the website, we can show the source code, but also say that one
could just do:
>>> import matplotlib.examples as ex
>>> ex.bars3d_demo()
My 2 cents...
Ben Root
From: Fernando P. <fpe...@gm...> - 2010年09月14日 19:50:16
On Tue, Sep 14, 2010 at 12:38 PM, Gökhan Sever <gok...@gm...> wrote:
>
> Sage provides some level of interaction actually without any deployment made
> on local side. Try for instance the following example on sagenb.org
> from scipy import stats
> import numpy as np
> import matplotlib.pyplot as plt
> @interact
> def plot_gamma(a=(1,(1,10)), loc=(0,(0,10)), scale=(1,(1,10))):
>   rv = stats.gamma(a, loc, scale)
>   x = np.linspace(-1,20,1000)
>   plt.plot(x,rv.pdf(x))
>   plt.grid(True)
>   plt.savefig('plt.png')
>   plt.clf()
> This one is very useful for educational and demonstrative purposes. Still
> requires a bit Sage syntax manipulations to make things fully interacting on
> browser.
> Nice that you have matured IPython infra for implementing
> such interactive functionality. I was thinking perhaps running something on
> top GApss Engine but not sure they allow compiling/running C/C++ extensions
> on their servers. Alternatively, like in Sage servers virtual OS'es might be
> the way to go with it then possibly there will be user registration and
> management issues (not sure about all specifics).
Actually sage does have one *implicit* but very particular 'local
deployment': its notebook execution model is *strictly* tied to the
idea that the client is a web browser. Try this code in the sage
terminal (i.e. their customized ipython, not the notebook):
sage: @interact
....: def x(a=(1, (1, 10))):
....: print a
....:
and you'll see:
<html><!--notruncate--><div padding=6 id='div-interact-0'> <table
width=800px height=20px bgcolor='#c5c5c5'
 cellpadding=15><tr><td bgcolor='#f9f9f9' valign=top
align=left><table><tr><td align=right><font
color="black">a&nbsp;</font></td><td><table><tr><td>
 <div id='slider-a-0' style='margin:0px; margin-left: 1.0em;
margin-right: 1.0em; width: 15.0em;'></div>
 ... lots more...
</table><div id='cell-interact-0'><?__SAGE__START>
 <table border=0 bgcolor='#white' width=100% height=100%>
 <tr><td bgcolor=white align=left
valign=top><pre><?__SAGE__TEXT></pre></td></tr>
 <tr><td align=left valign=top><?__SAGE__HTML></td></tr>
 </table><?__SAGE__END></div></td>
 </tr></table></div>
 </html>
sage:
So you can see, @interact in sage does basically:
- analyze the inputs of the function
- do some basic 'type inference' and emit javascript/html controls for
each parameter.
- emit an html section that wires the above controls to repeated calls
of the decorated function as the controls are operated.
This is very cool, and it enables great functionality, but it's
hard-coded to an html/javascript client.
What we're doing is a little different, as we've built a *protocol*
that clients can use to talk to the kernel, regardless of how they are
implemented.
As the functionality matures, we'll see who contributes a
browser-based client (that will require wrapping the kernel in an http
server, obviously). And then the question of things like @interact
will be an interesting one to think about. @interact by nature is
creating a user interface (Mathematica's Manipulate creates Notebook
controls, sage's @interact creates HTML ones). I'm not sure yet how
we'll approach that: having per-client implementations? A traits-style
approach where each client renders it differently? No idea yet.
Cheers,
f
From: Gökhan S. <gok...@gm...> - 2010年09月14日 19:39:04
On Tue, Sep 14, 2010 at 1:58 PM, Fernando Perez <fpe...@gm...>wrote:
> >> 2-) Matplotlib gallery might turn to an interactive environment where
> you
> >> can execute the script from right within your browser and change
> parameters
> >> in the same browser window. As far as I know mpl figures can now be
> drawn on
> >> html canvas. This might for sure boost the number of matplotlib
> audience.
> >
> > Is there a sandboxed browser plugin? Or server plugin, depending on
> > where you run the script?
>
> This would have to be server-side, and code needs to be written. Part
> of our interest with this explicit separation of ipython kernel and
> clients with a well-defined protocol is to make the above possible.
> But we haven't written any of the code necessary to have a browser
> client, and to serve code read from a sphinx-generated HTML page.
> Gokhan, your patches will be welcome, the infrastructure is now ready
> and waiting for you :)
Sage provides some level of interaction actually without any deployment made
on local side. Try for instance the following example on sagenb.org
from scipy import stats
import numpy as np
import matplotlib.pyplot as plt
@interact
def plot_gamma(a=(1,(1,10)), loc=(0,(0,10)), scale=(1,(1,10))):
 rv = stats.gamma(a, loc, scale)
 x = np.linspace(-1,20,1000)
 plt.plot(x,rv.pdf(x))
 plt.grid(True)
 plt.savefig('plt.png')
 plt.clf()
This one is very useful for educational and demonstrative purposes. Still
requires a bit Sage syntax manipulations to make things fully interacting on
browser.
Nice that you have matured IPython infra for implementing
such interactive functionality. I was thinking perhaps running something on
top GApss Engine but not sure they allow compiling/running C/C++ extensions
on their servers. Alternatively, like in Sage servers virtual OS'es might be
the way to go with it then possibly there will be user registration and
management issues (not sure about all specifics).
Probably, Ondrej might like experiencing with this idea :) Since he has
similar initiatives and asking help on similar topics. I am trying to
graduate myself working to solve some of my research problems and struggling
with writing especially to move on PhD. This might be a very fun Summer job
if I am wandering around jobless then.
-- 
Gökhan
From: Gökhan S. <gok...@gm...> - 2010年09月14日 19:23:11
On Tue, Sep 14, 2010 at 1:48 PM, Anne Archibald
<aar...@ph...>wrote:
> On 14 September 2010 11:08, Gökhan Sever <gok...@gm...> wrote:
>
> > 1-) When one downloads a script from the matplotlib gallery via an
> external
> > script (name it load_into_ipython or open_with_ipython) the contents of
> that
> > gallery script (or any python script) can be executed locally inside an
> > ipython session.
>
> Not to be difficult, but I should point out that allowing users to run
> code with one click, particularly if that code is from a wiki or other
> user-submitted gallery, is just asking for trouble. How long before
> someone submits "import os, shutil;
> shutil.deltree(os.environ['HOME'])"? Or sneaks it into some otherwise
> inoffensive script?
>
I was thinking naively --with Python for Science in mind not Python for
Hacking. I accept this is a not good idea considering that harmful effect
but in this brave new world of us there is always danger involved when one
puts their hands on virtual lands --whether the code is executed
intentionally or sneaked by a conic head.
>
> > 2-) Matplotlib gallery might turn to an interactive environment where you
> > can execute the script from right within your browser and change
> parameters
> > in the same browser window. As far as I know mpl figures can now be drawn
> on
> > html canvas. This might for sure boost the number of matplotlib audience.
>
> Is there a sandboxed browser plugin? Or server plugin, depending on
> where you run the script?
>
This one is one of my aloud speculations. Only at ideas level. I will write
more, answering Fernando's reply.
>
> Anne
>
-- 
Gökhan
From: Fernando P. <fpe...@gm...> - 2010年09月14日 18:58:40
On Tue, Sep 14, 2010 at 11:48 AM, Anne Archibald
<aar...@ph...> wrote:
> On 14 September 2010 11:08, Gökhan Sever <gok...@gm...> wrote:
>
>> 1-) When one downloads a script from the matplotlib gallery via an external
>> script (name it load_into_ipython or open_with_ipython) the contents of that
>> gallery script (or any python script) can be executed locally inside an
>> ipython session.
>
> Not to be difficult, but I should point out that allowing users to run
> code with one click, particularly if that code is from a wiki or other
> user-submitted gallery, is just asking for trouble. How long before
> someone submits "import os, shutil;
> shutil.deltree(os.environ['HOME'])"? Or sneaks it into some otherwise
> inoffensive script?
Very valid points. I'm leaning more towards something like a
combination of (hopefully) a 'copy code' button on the MPL webpages
themselves, so users don't have to scroll/highlight a lot but would
still do paste, execute manually, and a special %mplexample magic.
This would only run examples from the mpl gallery (hardcoding the
path), would display the code to the user first, and would ask for
confirmation before execution. Since those html pages are built by
executing those same scripts, there's a layer of sanity already built
into it (the rmtree call would have already nuked the builder's home
directory in the build process if it had been there). Showing the
code to the user and confirming execution before proceeding adds a
final chance for the person to check her parachute before jumping off
the cliff.
Does that sound reasonable?
>> 2-) Matplotlib gallery might turn to an interactive environment where you
>> can execute the script from right within your browser and change parameters
>> in the same browser window. As far as I know mpl figures can now be drawn on
>> html canvas. This might for sure boost the number of matplotlib audience.
>
> Is there a sandboxed browser plugin? Or server plugin, depending on
> where you run the script?
This would have to be server-side, and code needs to be written. Part
of our interest with this explicit separation of ipython kernel and
clients with a well-defined protocol is to make the above possible.
But we haven't written any of the code necessary to have a browser
client, and to serve code read from a sphinx-generated HTML page.
Gokhan, your patches will be welcome, the infrastructure is now ready
and waiting for you :)
Cheers,
f
From: Anne A. <aar...@ph...> - 2010年09月14日 18:48:51
On 14 September 2010 11:08, Gökhan Sever <gok...@gm...> wrote:
> 1-) When one downloads a script from the matplotlib gallery via an external
> script (name it load_into_ipython or open_with_ipython) the contents of that
> gallery script (or any python script) can be executed locally inside an
> ipython session.
Not to be difficult, but I should point out that allowing users to run
code with one click, particularly if that code is from a wiki or other
user-submitted gallery, is just asking for trouble. How long before
someone submits "import os, shutil;
shutil.deltree(os.environ['HOME'])"? Or sneaks it into some otherwise
inoffensive script?
> 2-) Matplotlib gallery might turn to an interactive environment where you
> can execute the script from right within your browser and change parameters
> in the same browser window. As far as I know mpl figures can now be drawn on
> html canvas. This might for sure boost the number of matplotlib audience.
Is there a sandboxed browser plugin? Or server plugin, depending on
where you run the script?
Anne
From: Fernando P. <fpe...@gm...> - 2010年09月14日 18:21:19
Hey,
On Tue, Sep 14, 2010 at 8:21 AM, John Hunter <jd...@gm...> wrote:
>
> How about this as an alternative: on my box, I can drag the "source
> code" link from the browser into my terminal, which by default pastes
> the URL of the referenced *.py into the terminal. If "run" supported
> a -w (web) option, or automatically detected that the URL starts with
> http, it could do a web run of the file. Of course, you may want the
> source code pasted in for illustrative purposes... To support this,
> you could add a -u (url) option to "paste" which assumes the input is
> a url, fetches it, and pastes the contents into ipython. So you could
> type "paste -u" and then drag the link into the terminal, and it would
> fetch it and paste the code into an input block.
I'll play with those ideas, good thoughts. %paste may not be the best
location because paste is now a terminal-only magic, since gui clients
have 'real' paste. What's a little trickier now is that we really
need to think all the time in terms of completely separate kernel and
client codes, that only communicate via messages. So a magic can't
muck with code in the client, because the magic executes inside the
kernel and the client is in a separate process (and possibly in a
separate computer). While this is a bit more constraining, it forces
us to have a clean separation between different kinds of
functionality.
We've toyed with the idea of enabling a special syntax for *purely
client side* commands, something like
:cmd
that would never be sent to the kernel, and would be something for the
client to process internally. But we'll have to mull this a little
longer...
One very important point in all of this is that the client *may not be
written in Python*. All we have is a messaging protocol, the client
could be a web browser or anything else.
But in any case, I'll play with ways to expose this that are as easy
as possible for the users thanks for the feedback.
Cheers,
f
From: Fernando P. <fpe...@gm...> - 2010年09月14日 18:14:58
On Mon, Sep 13, 2010 at 7:08 PM, David Warde-Farley
<war...@ir...> wrote:
>
> Nice work IPython people! I haven't been following too closely but this looks exciting.
Thanks, David. Hopefully by next week we'll complete our
stabilization so that we're willing to foist this on the ipython-dev
and mpl-dev denizens. Anyone is welcome to try it out now, but we're
moving things around enough that at any given point it may or may not
work. We'll move it into trunk once the churn stops.
Regards,
f
From: Fernando P. <fpe...@gm...> - 2010年09月14日 18:13:17
On Tue, Sep 14, 2010 at 8:59 AM, Michael Droettboom <md...@st...> wrote:
>
> This is now fixed in r8699.
>> - One produced an error:
>> http://matplotlib.sourceforge.net/examples/axes_grid/simple_axisline4.html
>>
>> ...
>>   ...: plt.draw()
>>   ...: plt.show()
>>   ...:
>> Received invalid plot data.
>>
> This is now fixed in r8700.
Great, many thanks for these fixes! It means that we're probably
capable now of running just about every pylab example out of the
box... We'll keep testing and will report if we see anything weird.
>> One small request: is it possible/easy to add to the MPL examples a
>> little 'copy to clipboard' button or link? Now that one can
>> copy/paste wholesale examples into an interactive session to explore
>> them, it feels annoying to have to highlight the whole text box and
>> then do Ctrl-C or menu->copy. It would be really nice to have a
>> one-click 'copy to clipboard'... But I have no idea if that's easy or
>> hard in HTML...
>>
> Good idea. I'll have a look at how hard this would be to add as a
> Sphinx extension.
Great, if it can be done it would be wonderful (Robert indicated it
may require flash, but others provided JS pointers; I'll leave it to
you to navigate those lovely waters :)
Cheers,
f
From: Michael D. <md...@st...> - 2010年09月14日 16:00:08
On 09/13/2010 04:58 PM, Fernando Perez wrote:
> Hi folks,
>
> [ sorry for the cross-post, but devs on both lists will care about this]
>
> I just went through the exercise of pasting 100 randomly chosen
> examples from the gallery into the new ipython console with inline
> graphics. Report:
>
> - 98 worked perfectly: the figures I got were identical to those on the website.
>
> - 1 had minor visual differences:
> http://matplotlib.sourceforge.net/examples/pylab_examples/quadmesh_demo.html:
> in the SVG render, the masked region
> appears black instead of transparent.
> 
This is now fixed in r8699.
> - One produced an error:
> http://matplotlib.sourceforge.net/examples/axes_grid/simple_axisline4.html
>
> ...
> ...: plt.draw()
> ...: plt.show()
> ...:
> Received invalid plot data.
> 
This is now fixed in r8700.
> But when I save the file and try to load it into firefox, it seems to
> indeed be bad SVG:
>
> XML Parsing Error: mismatched tag. Expected:</g>.
> Location: file:///home/fperez/ipython/ipython/bad.svg
> Line Number 287, Column 3:</svg>
> --^
>
> In summary: we can run pretty much any MPL example by straight
> copy/paste, and the only two glitches I see are in the SVG data
> itself. Once the other two buglets I reported earlier get fixed up,
> this will be a very nice way to interact with MPL.
>
> One small request: is it possible/easy to add to the MPL examples a
> little 'copy to clipboard' button or link? Now that one can
> copy/paste wholesale examples into an interactive session to explore
> them, it feels annoying to have to highlight the whole text box and
> then do Ctrl-C or menu->copy. It would be really nice to have a
> one-click 'copy to clipboard'... But I have no idea if that's easy or
> hard in HTML...
> 
Good idea. I'll have a look at how hard this would be to add as a 
Sphinx extension.
Cheers,
Mike
> Anyway, I think we're starting to be in pretty good shape!
>
> Cheers,
>
> f
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> Matplotlib-devel mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
> 
-- 
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA
From: Brian G. <ell...@gm...> - 2010年09月14日 15:33:57
On Tue, Sep 14, 2010 at 12:59 AM, Eric Firing <ef...@ha...> wrote:
> On 09/13/2010 05:46 PM, Brian Granger wrote:
>>
>> On Tue, Sep 7, 2010 at 1:31 PM, Eric Firing<ef...@ha...> wrote:
>>>
>>> On 09/03/2010 12:37 PM, Brian Granger wrote:
>>>>
>>>> Hello all,
>>>>
>>>> I would like to submit the following branch on github for review and
>>>> merging into matplotlib trunk:
>>>>
>>>> http://github.com/ellisonbg/matplotlib/commits/guisupport
>>>>
>>>> This branch implements the logic needed for the qt4 and wx backends to
>>>> fully work with the upcoming IPython 0.11 release. In our testing we
>>>> have run many of the mpl examples (including the new animation
>>>> examples) in both qt4/wx in both the terminal based IPython and the
>>>> new IPython Qt GUI. For background on these changes please see this
>>>> thread:
>>>>
>>>>
>>>> http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTik2SNtXMaezCc0UiMnCYg6LxwEL1eN9YASnmOua%40mail.gmail.com&forum_name=matplotlib-devel
>>>>
>>>> It is important to note that we have not updated the other matplotlib
>>>> backends (gtk, tk, etc.) to have this logic. This is mainly because
>>>> we know almost nothing about these toolkits and could really use some
>>>> help from folks who are experts at the respective toolkits. We have
>>>> done some minimal testing and these other backends do work for simple
>>>> examples in the terminal IPython, but they won't work in all cases and
>>>> will definitely not work in the new IPython Qt based GUI.
>>>>
>>>> We would love feedback and help testing as these changes are
>>>> significant (even though only a few lines of code). To test this
>>>> stuff you will need to grab the following IPython development branch:
>>>>
>>>> http://github.com/ipython/ipython/tree/newkernel
>>>>
>>>> You should be able to run the examples in regular ipython:
>>>>
>>>> ipython --pylab qt4|wx
>>>>
>>>> Or the new GUI
>>>>
>>>> ipythonqt --pylab qt4|wx
>>>
>>> Brian, Fernando,
>>>
>>> I have been doing a little testing with ipython 0.10 versus
>>> ipython-newkernel, both modes, and with mpl svn versus your guisupport.
>>> There are so many possible modes of operation and combinations of
>>> versions and backends that all this will take some time to sort out.
>>>
>>> Can you give me simple examples of what does *not* work correctly when
>>> you use mpl *svn* with ipython-newkernel, in either or both of the
>>> console or gui modes, but *does* work with your guisupport version?
>>
>> The problems are when matplotlib and enthought.traits/pyface/mayavi
>> stuff are used together. There are two types of problems:
>>
>> * Multiple apps are created. The enthought stuff used to not check
>> for existing apps, but that has been fixed.
>
> That one is easy.
>
>> * Event loop is started multiple times. This one is more subtle and
>> on some toolkits the error is not fatal. This problem shows up when
>> IPython is run in terminal mode and event loop integration is handled
>> through PyOS_InputHook. In these situations, if matplotlib or ets
>> start the event loop themselves, IPython will hang.
>
> So, this can be checked with nothing but IPython and mpl. I think I may have
> seen this with some combination of configurations, though not with what I
> typically use.
>
>>
>> Unfortunately, I am having trouble getting an install of both
>> matplotlib svn and ets svn on the same machine, so I can't reproduce
>> any of the failures ATM. I am trying to get things installed so I can
>> reproduce the problems.
>
> At least twice in the last couple of years I have tried to get mayavi
> compiled and running, without fouling up my development versions of numpy
> and mpl. I never succeeded. Granted, I didn't allocate much time and
> mental energy to it.
Yes, it can be a challenge, we will see how far I get...
> In any case, with the help of your recent explanations, I expect we can make
> mpl play by your suggested rules without sacrificing anything. Part of the
> change for mpl 1.0 was to factor all of the show logic out into
> backend_bases.py, leaving only the core mainloop call in the specific
> backends. I hope we can keep that aspect, retaining the ability to work
> with earlier ipython (0.10) and the ability for show to block or not
> depending on the interactivity state.
The refactored show logic does help a lot. I am pretty sure that my
branch already does all the things you want though. If there are
things that it is missing we can definitely add them. But when you
get a chance to look at this, let us know and we can continue the
discussion.
Cheers,
Brian
> Eric
>
>
>
-- 
Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgr...@ca...
ell...@gm...
From: John H. <jd...@gm...> - 2010年09月14日 15:21:53
On Mon, Sep 13, 2010 at 4:10 PM, Brian Granger <ell...@gm...> wrote:
>> One small request: is it possible/easy to add to the MPL examples a
>> little 'copy to clipboard' button or link? Now that one can
>> copy/paste wholesale examples into an interactive session to explore
>> them, it feels annoying to have to highlight the whole text box and
>> then do Ctrl-C or menu->copy. It would be really nice to have a
>> one-click 'copy to clipboard'... But I have no idea if that's easy or
>> hard in HTML...
>
> +1 to this!
On a quick googling, there are some IE only Javascript examples to do
this. Apparently you can enable them in firefox but it requires a
significant amount of about:config hackery
(http://www.febooti.com/support/website-help/website-javascript-copy-clipboard.html).
How about this as an alternative: on my box, I can drag the "source
code" link from the browser into my terminal, which by default pastes
the URL of the referenced *.py into the terminal. If "run" supported
a -w (web) option, or automatically detected that the URL starts with
http, it could do a web run of the file. Of course, you may want the
source code pasted in for illustrative purposes... To support this,
you could add a -u (url) option to "paste" which assumes the input is
a url, fetches it, and pastes the contents into ipython. So you could
type "paste -u" and then drag the link into the terminal, and it would
fetch it and paste the code into an input block.
JDH
From: Gökhan S. <gok...@gm...> - 2010年09月14日 15:08:18
On Mon, Sep 13, 2010 at 6:44 PM, Fernando Perez <fpe...@gm...>wrote:
> Thanks, that's good to know. But I'm mostly thinking of teaching
> situations, so it would be nice to have this in the source: it's not
> for my use but for the benefit of students who may be in a lab where
> they can't install extensions. But I don't know if that can even be
> done in html in the first place.
>
I think there might be a couple different approaches that might be useful
for educational purposes of IPython + matplotlib usage. For instance:
1-) When one downloads a script from the matplotlib gallery via an external
script (name it load_into_ipython or open_with_ipython) the contents of that
gallery script (or any python script) can be executed locally inside an
ipython session.
2-) Matplotlib gallery might turn to an interactive environment where you
can execute the script from right within your browser and change parameters
in the same browser window. As far as I know mpl figures can now be drawn on
html canvas. This might for sure boost the number of matplotlib audience.
-- 
Gökhan
From: Eric F. <ef...@ha...> - 2010年09月14日 07:59:28
On 09/13/2010 05:46 PM, Brian Granger wrote:
> On Tue, Sep 7, 2010 at 1:31 PM, Eric Firing<ef...@ha...> wrote:
>> On 09/03/2010 12:37 PM, Brian Granger wrote:
>>> Hello all,
>>>
>>> I would like to submit the following branch on github for review and
>>> merging into matplotlib trunk:
>>>
>>> http://github.com/ellisonbg/matplotlib/commits/guisupport
>>>
>>> This branch implements the logic needed for the qt4 and wx backends to
>>> fully work with the upcoming IPython 0.11 release. In our testing we
>>> have run many of the mpl examples (including the new animation
>>> examples) in both qt4/wx in both the terminal based IPython and the
>>> new IPython Qt GUI. For background on these changes please see this
>>> thread:
>>>
>>> http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTik2SNtXMaezCc0UiMnCYg6LxwEL1eN9YASnmOua%40mail.gmail.com&forum_name=matplotlib-devel
>>>
>>> It is important to note that we have not updated the other matplotlib
>>> backends (gtk, tk, etc.) to have this logic. This is mainly because
>>> we know almost nothing about these toolkits and could really use some
>>> help from folks who are experts at the respective toolkits. We have
>>> done some minimal testing and these other backends do work for simple
>>> examples in the terminal IPython, but they won't work in all cases and
>>> will definitely not work in the new IPython Qt based GUI.
>>>
>>> We would love feedback and help testing as these changes are
>>> significant (even though only a few lines of code). To test this
>>> stuff you will need to grab the following IPython development branch:
>>>
>>> http://github.com/ipython/ipython/tree/newkernel
>>>
>>> You should be able to run the examples in regular ipython:
>>>
>>> ipython --pylab qt4|wx
>>>
>>> Or the new GUI
>>>
>>> ipythonqt --pylab qt4|wx
>>
>> Brian, Fernando,
>>
>> I have been doing a little testing with ipython 0.10 versus
>> ipython-newkernel, both modes, and with mpl svn versus your guisupport.
>> There are so many possible modes of operation and combinations of
>> versions and backends that all this will take some time to sort out.
>>
>> Can you give me simple examples of what does *not* work correctly when
>> you use mpl *svn* with ipython-newkernel, in either or both of the
>> console or gui modes, but *does* work with your guisupport version?
>
> The problems are when matplotlib and enthought.traits/pyface/mayavi
> stuff are used together. There are two types of problems:
>
> * Multiple apps are created. The enthought stuff used to not check
> for existing apps, but that has been fixed.
That one is easy.
> * Event loop is started multiple times. This one is more subtle and
> on some toolkits the error is not fatal. This problem shows up when
> IPython is run in terminal mode and event loop integration is handled
> through PyOS_InputHook. In these situations, if matplotlib or ets
> start the event loop themselves, IPython will hang.
So, this can be checked with nothing but IPython and mpl. I think I may 
have seen this with some combination of configurations, though not with 
what I typically use.
>
> Unfortunately, I am having trouble getting an install of both
> matplotlib svn and ets svn on the same machine, so I can't reproduce
> any of the failures ATM. I am trying to get things installed so I can
> reproduce the problems.
At least twice in the last couple of years I have tried to get mayavi 
compiled and running, without fouling up my development versions of 
numpy and mpl. I never succeeded. Granted, I didn't allocate much time 
and mental energy to it.
In any case, with the help of your recent explanations, I expect we can 
make mpl play by your suggested rules without sacrificing anything. 
Part of the change for mpl 1.0 was to factor all of the show logic out 
into backend_bases.py, leaving only the core mainloop call in the 
specific backends. I hope we can keep that aspect, retaining the 
ability to work with earlier ipython (0.10) and the ability for show to 
block or not depending on the interactivity state.
Eric
From: Eric F. <ef...@ha...> - 2010年09月14日 07:37:02
On 09/13/2010 08:54 AM, Brian Granger wrote:
> Eric,
>
> Sorry about the delay, I was on vacation last week...comments inline below...
>
> On Tue, Sep 7, 2010 at 2:26 PM, Eric Firing<ef...@ha...> wrote:
>> On 09/07/2010 11:07 AM, Fernando Perez wrote:
>>> Hi Eric,
>>>
>>> On Tue, Sep 7, 2010 at 1:31 PM, Eric Firing<ef...@ha...> wrote:
>>>>
>>>> I have been doing a little testing with ipython 0.10 versus
>>>> ipython-newkernel, both modes, and with mpl svn versus your guisupport.
>>>> There are so many possible modes of operation and combinations of
>>>> versions and backends that all this will take some time to sort out.
>>>>
>>>> Can you give me simple examples of what does *not* work correctly when
>>>> you use mpl *svn* with ipython-newkernel, in either or both of the
>>>> console or gui modes, but *does* work with your guisupport version?
>>>
>>> Thanks for your testing, Eric.
>>>
>>> With matplotlib *alone*, I can't find a way to crash/lock/whatever the
>>> combo of matplotlib(svn)+ipython-newkernel.
>>>
>>> The reason, i believe, is that guisupport.py is available in ipython
>>> itself, and it goes out of its way to avoid creating a second main qt
>>> app, letting matplotlib create it. Since that main app is alive all
>>> the time, there's only one app and one event loop and life is good.
>>> But if I were to open another library that uses Qt and makes a new
>>> main qApp unconditionally, we'd have problems.
>>>
>>> Brian and Evan have recently just added the guisupport.py patch to
>>> Enthought's ETS, so that now it probably will be pretty hard to
>>> actually see the problem: if both ipython and ets go out of their way
>>> to avoid the nested main app issue, mpl can get away with making one
>>> unconditionally and things will probably work OK.
>>>
>>> But the idea is for all of us (ipython, ets, mpl, etc) to agree on a
>>> collaborative protocol with a simple api: check for one special
>>> '_in_event_loop' flag in the main toolkit before making one. That
>>> will make it easier to have interactive code that uses Wx or Qt from
>>> more than one library coexisting in the same process.
>>
>> Fernando,
>
>
>> There are two parts to guisupport: ensure a single main app, and ensure
>> no more than one call to the mainloop.
>
> Yes, that is a good summary.
>
>> The first makes perfect sense,
>> and cannot cause any problems that I can see. The second one is the one
>> that I think may be both unnecessary and undesirable. The reason is
>> that the gui toolkit mainloop functions or methods are designed for
>> nested calls. This permits blocking within a running mainloop, and
>> allows show() to block when pyplot is not in interactive mode. This is
>> what is lost with the guisupport mods. Some changes to mainloop logic
>> may well be needed, but I don't think that prohibiting nested calls to
>> the underlying toolkit mainloop function is necessary or desirable.
>
> This is a very good point and is something that we have thought
> carefully about. You are very correct, that the functions in
> guisupport cannot be used to do a nested mainloop. Nested calls to
> the mainloop should be done in the usual manner by simply calling the
> appropriate gui toolkit method for doing so. We probably need to
> clarify this point, but the focus of the functions in guisupport are
> *only* the first and main invocation of the event loop. Basically, we
> want to ensure that:
>
> * Projects don't accidentally do nested mainloops because there were
> not aware that the outermost eventloop was already running.
> * Projects start the outermost eventloop in a manner that other
> projects will be able to reliably detect.
>
> I should mention the other approach that we have tried, but that failed:
>
> * Have IPython startup, create an app and start the main loop.
> * Then monkeypatch the gui toolkit so that the mainloop calls are no-ops.
> * Further monkeypatch the gui toolkit so that it appears that the
> mainloop is running (even when it may not be because of PyOS_InputHook
> magic).
>
> This allowed us to do everything, BUT obviously, nested mainloops
> failed. Thus, making sure that nested mainloops still work was the
> main reason we have created guisupport. We should better document
> these details though.
Brian,
Thanks for the clarification. Your basic approach sounds fine. I need 
to think a little more about how to handle this in mpl. The proposed 
modification is not quite right yet. I probably can't work on it until 
the weekend.
Eric
>
> Cheers,
>
> Brian
>
>> Eric
>>
>>>
>>> I'll let Brian fill in with more details when he has some
>>> availability, but I think that's the gist of it.
>>>
>>> Regards,
>>>
>>> f
>>
>>
>> ------------------------------------------------------------------------------
>> This SF.net Dev2Dev email is sponsored by:
>>
>> Show off your parallel programming skills.
>> Enter the Intel(R) Threading Challenge 2010.
>> http://p.sf.net/sfu/intel-thread-sfd
>> _______________________________________________
>> Matplotlib-devel mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>>
>
>
>
From: Brian G. <ell...@gm...> - 2010年09月14日 03:46:41
On Tue, Sep 7, 2010 at 1:31 PM, Eric Firing <ef...@ha...> wrote:
> On 09/03/2010 12:37 PM, Brian Granger wrote:
>> Hello all,
>>
>> I would like to submit the following branch on github for review and
>> merging into matplotlib trunk:
>>
>> http://github.com/ellisonbg/matplotlib/commits/guisupport
>>
>> This branch implements the logic needed for the qt4 and wx backends to
>> fully work with the upcoming IPython 0.11 release. In our testing we
>> have run many of the mpl examples (including the new animation
>> examples) in both qt4/wx in both the terminal based IPython and the
>> new IPython Qt GUI. For background on these changes please see this
>> thread:
>>
>> http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTik2SNtXMaezCc0UiMnCYg6LxwEL1eN9YASnmOua%40mail.gmail.com&forum_name=matplotlib-devel
>>
>> It is important to note that we have not updated the other matplotlib
>> backends (gtk, tk, etc.) to have this logic. This is mainly because
>> we know almost nothing about these toolkits and could really use some
>> help from folks who are experts at the respective toolkits. We have
>> done some minimal testing and these other backends do work for simple
>> examples in the terminal IPython, but they won't work in all cases and
>> will definitely not work in the new IPython Qt based GUI.
>>
>> We would love feedback and help testing as these changes are
>> significant (even though only a few lines of code). To test this
>> stuff you will need to grab the following IPython development branch:
>>
>> http://github.com/ipython/ipython/tree/newkernel
>>
>> You should be able to run the examples in regular ipython:
>>
>> ipython --pylab qt4|wx
>>
>> Or the new GUI
>>
>> ipythonqt --pylab qt4|wx
>
> Brian, Fernando,
>
> I have been doing a little testing with ipython 0.10 versus
> ipython-newkernel, both modes, and with mpl svn versus your guisupport.
> There are so many possible modes of operation and combinations of
> versions and backends that all this will take some time to sort out.
>
> Can you give me simple examples of what does *not* work correctly when
> you use mpl *svn* with ipython-newkernel, in either or both of the
> console or gui modes, but *does* work with your guisupport version?
The problems are when matplotlib and enthought.traits/pyface/mayavi
stuff are used together. There are two types of problems:
* Multiple apps are created. The enthought stuff used to not check
for existing apps, but that has been fixed.
* Event loop is started multiple times. This one is more subtle and
on some toolkits the error is not fatal. This problem shows up when
IPython is run in terminal mode and event loop integration is handled
through PyOS_InputHook. In these situations, if matplotlib or ets
start the event loop themselves, IPython will hang.
Unfortunately, I am having trouble getting an install of both
matplotlib svn and ets svn on the same machine, so I can't reproduce
any of the failures ATM. I am trying to get things installed so I can
reproduce the problems.
Cheers,
Brian
> Thanks.
>
> Eric
>
>>
>> Cheers,
>>
>> Brian
>>
>
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by:
>
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd
> _______________________________________________
> Matplotlib-devel mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
-- 
Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgr...@ca...
ell...@gm...
From: David Warde-F. <war...@ir...> - 2010年09月14日 02:42:00
On 2010年09月13日, at 7:44 PM, Fernando Perez wrote:
> Thanks, that's good to know. But I'm mostly thinking of teaching
> situations, so it would be nice to have this in the source: it's not
> for my use but for the benefit of students who may be in a lab where
> they can't install extensions. But I don't know if that can even be
> done in html in the first place.
You can definitely hijack copies with JavaScript:
http://stackoverflow.com/questions/400212/how-to-copy-to-clipboard-in-javascript
Nice work IPython people! I haven't been following too closely but this looks exciting.
David
From: Benjamin R. <ben...@ou...> - 2010年09月14日 01:03:23
On Mon, Sep 13, 2010 at 6:44 PM, Fernando Perez <fpe...@gm...>wrote:
> On Mon, Sep 13, 2010 at 2:22 PM, Gökhan Sever <gok...@gm...>
> wrote:
> >
> > Either in Firefox or Chrome you could use extensions [Auto Copy] to copy
> > text selections into clipboard.
>
> Thanks, that's good to know. But I'm mostly thinking of teaching
> situations, so it would be nice to have this in the source: it's not
> for my use but for the benefit of students who may be in a lab where
> they can't install extensions. But I don't know if that can even be
> done in html in the first place.
>
> Cheers,
>
> f
>
In github, there is something like this for copying the address of someone's
git repo, but it might be done using Flash, I am not sure.
Ben Root

Showing 18 results of 18

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 によって変換されたページ (->オリジナル) /