Hmm,

Is it working on your side from a bash shell as "ipython --pylab script
argument"

I couldn't make it work in this fashion. As I said whos list nothing :(

I am on Fedora 10 x86, Python 2.5.2, IPython 0.10.bzr.r1173

Without the pylab switch I see the interactive space with variables. I also
have plot imported from my script, however each time I have to call show()
to see the figure to be re-drawn.

To me, it seems one need to compromise: either to start ipython --pylab
first and call scripts using "run" magic command or like you suggested start
ipython with the script loaded and call show() after each plot command.

Please comment me if I am wrong...

Gökhan


On Sun, May 17, 2009 at 3:19 PM, Roy Hyunjin Han <
starsareblueandfara...@gmail.com> wrote:

> On Sun, May 17, 2009 at 2:17 PM, Gökhan SEVER <gokhanse...@gmail.com>
> wrote:
> > Hello Roy,
> >
> > "ipython splot.py 09_03_23_11_44_54.stats.tas"
> >
> > works, but I can't make it work with pylab switch. It executes my script,
> > however whos list an empty namespace :(
>
> Gökhan,
>
> The "whos" command works for me.
>
> Also, why can't you use "import pylab" and make your plots directly in
> ipython?
> You can also use "from pylab import *" if you don't want to type pylab
> every time.
>
> In [1]: whos
> Variable                       Type        Data/Info
> ----------------------------------------------------
> argv                           list        ['splot.py',
> '09_03_23_11_44_54.stats.tas']
> argv_arr                       ndarray     12x13: 156 elems, type
> `float64`, 1248 bytes
> axes                           function    <function axes at 0x92b6064>
> axis                           function    <function axis at 0x92b6294>
> boxplot                        function    <function boxplot at 0x92b6924>
> d09_03_23_11_44_54_stats_tas   ndarray     12x13: 156 elems, type
> `float64`, 1248 bytes
> data_len                       int         12
> draw                           function    <function draw at 0x9212dbc>
> f                              file        <closed file
> '09_03_23_11<...>', mode 'r' at 0x88ef260>
> i                              int         11
> loadtxt                        function    <function loadtxt at 0x8b65304>
> mouse_hover_formatx            function    <function
> mouse_hover_formatx at 0x88e84fc>
> mouse_hover_formaty            function    <function
> mouse_hover_formaty at 0x88e84c4>
> plot                           function    <function plot at 0x92b6cdc>
> savefig                        function    <function savefig at 0x9212df4>
> show                           function    <function show at 0x920f72c>
> skiprows                       int         30
>
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to