Re: [matplotlib-devel] [IPython-dev] IPython (new) + matplotlib report: happy news
On Tue, Sep 14, 2010 at 8:21 AM, John Hunter jdh2...@gmail.com 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. Ask and ye shall receive (yes, the url was drag-dropped from the 'source code' link in the mpl page), welcome %loadpy: http://fperez.org/tmp/iqlab_mpl_loadpy.png Full credits go to Brian and Evan! 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 Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] [IPython-dev] IPython (new) + matplotlib report: happy news
That's very cool. Unrelated to %loadpy, but is anyone else bothered/confused by the fact that the both the plot in the website and the plot embedded in the app are wrong? There are lines that should be blue (they don't intersect the bbox) in both that are red. I presume this is a bug in either the intersect calculation, or the plot command in the example code. -MinRK On Thu, Sep 16, 2010 at 13:36, Fernando Perez fperez@gmail.com wrote: On Tue, Sep 14, 2010 at 8:21 AM, John Hunter jdh2...@gmail.com 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. Ask and ye shall receive (yes, the url was drag-dropped from the 'source code' link in the mpl page), welcome %loadpy: http://fperez.org/tmp/iqlab_mpl_loadpy.png Full credits go to Brian and Evan! Cheers, f ___ IPython-dev mailing list ipython-...@scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev -- 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 Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] [IPython-dev] IPython (new) + matplotlib report: happy news
On Mon, Sep 13, 2010 at 6:44 PM, Fernando Perez fperez@gmail.comwrote: 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 -- 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 Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] [IPython-dev] IPython (new) + matplotlib report: happy news
On Mon, Sep 13, 2010 at 4:10 PM, Brian Granger elliso...@gmail.com 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 -- 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 Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] [IPython-dev] IPython (new) + matplotlib report: happy news
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 -- 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 Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] [IPython-dev] IPython (new) + matplotlib report: happy news
On 14 September 2010 11:08, Gökhan Sever gokhanse...@gmail.com 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 -- 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 Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] [IPython-dev] IPython (new) + matplotlib report: happy news
On Tue, Sep 14, 2010 at 11:48 AM, Anne Archibald aarch...@physics.mcgill.ca wrote: On 14 September 2010 11:08, Gökhan Sever gokhanse...@gmail.com 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 -- 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 Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] [IPython-dev] IPython (new) + matplotlib report: happy news
On Tue, Sep 14, 2010 at 1:48 PM, Anne Archibald aarch...@physics.mcgill.cawrote: On 14 September 2010 11:08, Gökhan Sever gokhanse...@gmail.com 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 -- 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 Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] [IPython-dev] IPython (new) + matplotlib report: happy news
On Tue, Sep 14, 2010 at 1:58 PM, Fernando Perez fperez@gmail.comwrote: 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 -- 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 Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] [IPython-dev] IPython (new) + matplotlib report: happy news
On Tue, Sep 14, 2010 at 12:38 PM, Gökhan Sever gokhanse...@gmail.com 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=15trtd bgcolor='#f9f9f9' valign=top align=lefttabletrtd align=rightfont color=blackanbsp;/font/tdtdtabletrtd div id='slider-a-0' style='margin:0px; margin-left: 1.0em; margin-right: 1.0em; width: 15.0em;'/div ... lots more... /tablediv id='cell-interact-0'?__SAGE__START table border=0 bgcolor='#white' width=100% height=100% trtd bgcolor=white align=left valign=toppre?__SAGE__TEXT/pre/td/tr trtd 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 -- 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 Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] [IPython-dev] IPython (new) + matplotlib report: happy news
On Tue, Sep 14, 2010 at 1:58 PM, Fernando Perez fperez@gmail.comwrote: On Tue, Sep 14, 2010 at 11:48 AM, Anne Archibald aarch...@physics.mcgill.ca wrote: On 14 September 2010 11:08, Gökhan Sever gokhanse...@gmail.com 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 -- 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 Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] [IPython-dev] IPython (new) + matplotlib report: happy news
On Wed, Sep 15, 2010 at 12:39 AM, Fernando Perez fperez@gmail.comwrote: On Tue, Sep 14, 2010 at 12:57 PM, Benjamin Root ben.r...@ou.edu wrote: 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() The idea is to have the *actual code* pasted in your terminal, because now we can easily edit complex multi-line examples directly in ipython. So it's not just a matter of seeing the figure results, but mostly of having the actual source in your input buffer to play with. Cheers, f True... but, consider this. ipython can already display the code for a particular module/function using the '??' idiom. Why not have some way to take that text and bring it into the input buffer? I can imagine this being useful beyond matplotlib where anybody could have their example codes easily accessed and edited. Ben Root -- 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 Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] [IPython-dev] IPython (new) + matplotlib report: happy news
On Tue, Sep 14, 2010 at 6:01 PM, Benjamin Root ben.r...@ou.edu wrote: True... but, consider this. ipython can already display the code for a particular module/function using the '??' idiom. Why not have some way to take that text and bring it into the input buffer? Yes, but that's a separate issue. The approach you propose would likely have in ex.demo_somehting() a stub to retrieve the actual example code as a string from a file elsewhere, because (at least right now) the mpl examples are written as 100% standalone files, not as functions inside of some other control module. What you are saying does apply to the mayavi.mlab.test_*() functions, that do serve as examples precisely in that manner, since those *do* contain their code inside the functions. So for the matplotlib examples, that live in standalone files, we'd still need something different. I can imagine this being useful beyond matplotlib where anybody could have their example codes easily accessed and edited. Certainly! Right now the pager is a very simple tool, but I hope that once we put this code out we'll get contributions from enterprising Qt coders who may improve it and add things like a button that would copy the code from the source part of an info pane and paste it in the interactive area, all with a single click. We want to settle the core protocol/messaging behavior first, and once this is ready and people test it a little, I really hope we'll get contributions that enhance the user experience very much in this manner. 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 Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] [IPython-dev] IPython (new) + matplotlib report: happy news
On Wed, Sep 15, 2010 at 1:08 AM, Fernando Perez fperez@gmail.comwrote: On Tue, Sep 14, 2010 at 6:01 PM, Benjamin Root ben.r...@ou.edu wrote: True... but, consider this. ipython can already display the code for a particular module/function using the '??' idiom. Why not have some way to take that text and bring it into the input buffer? Yes, but that's a separate issue. The approach you propose would likely have in ex.demo_somehting() a stub to retrieve the actual example code as a string from a file elsewhere, because (at least right now) the mpl examples are written as 100% standalone files, not as functions inside of some other control module. What you are saying does apply to the mayavi.mlab.test_*() functions, that do serve as examples precisely in that manner, since those *do* contain their code inside the functions. So for the matplotlib examples, that live in standalone files, we'd still need something different. Well, my idea was predicated upon what I said previously that matplotlib should package the examples into a useful module with function call. This way, one could have been able to run the demos and view the code just like any other piece of code in matplotlib. I can imagine this being useful beyond matplotlib where anybody could have their example codes easily accessed and edited. Certainly! Right now the pager is a very simple tool, but I hope that once we put this code out we'll get contributions from enterprising Qt coders who may improve it and add things like a button that would copy the code from the source part of an info pane and paste it in the interactive area, all with a single click. We want to settle the core protocol/messaging behavior first, and once this is ready and people test it a little, I really hope we'll get contributions that enhance the user experience very much in this manner. That is a good gameplan. What I have seen of ipython is very good and really resolves a lot of gripes I have had with my typical python development workflow. Keep up the good work! Ben Root -- 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 Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] [IPython-dev] IPython (new) + matplotlib report: happy news
On Tue, Sep 14, 2010 at 6:29 PM, Benjamin Root ben.r...@ou.edu wrote: Good point. I guess I am just a little *too* terminal-oriented. It's probably worth mentioning that we've gone to great lengths to try to produce in the new console an experience that's as seamless and fluid as possible to anyone who 'lives in a terminal' (like myself). We want this to be 'a terminal, but better': multiline editing, inline graphics, html documentation, popups with call tips, but all the keyboard friendliness and raw efficiency of a terminal. Put another way: this should be 100% usable *without* a mouse, and you should be more efficient with this in python than with any terminal. If you're not, it's a bug :) 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 Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] [IPython-dev] IPython (new) + matplotlib report: happy news
Fernando, On Mon, Sep 13, 2010 at 1:58 PM, Fernando Perez fperez@gmail.com 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. That is a pretty significant test of the new console100 is a lot of copying and pasting. - 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. - One produced an error: http://matplotlib.sourceforge.net/examples/axes_grid/simple_axisline4.html ... ...: plt.draw() ...: plt.show() ...: Received invalid plot data. 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... +1 to this! Cheers, Brian Anyway, I think we're starting to be in pretty good shape! Cheers, f ___ IPython-dev mailing list ipython-...@scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev -- Brian E. Granger, Ph.D. Assistant Professor of Physics Cal Poly State University, San Luis Obispo bgran...@calpoly.edu elliso...@gmail.com -- 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 Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] [IPython-dev] IPython (new) + matplotlib report: happy news
On Mon, Sep 13, 2010 at 2:22 PM, Gökhan Sever gokhanse...@gmail.com 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 -- 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 Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel