[Yt-dev] Request for Review: Pylab in reason

Matthew Turk matthewturk at gmail.com
Wed May 4 12:50:23 PDT 2011


Hi Cameron,

Okay, I see the behavior you're describing.  I think it's because
pylab initializes a 'blank' Figure object, and then it draws that.  My
suspicion is that this happens interactively, but that we never see it
because it happens too quickly.

We might be able to get around this by having the FigureManager output
nothing the first time it creates a new Figure.  But for now I think I
will leave it, and we'll just have an ugly wart in the code... until
somebody can figure out a way around it.

Anyway, thanks for testing -- and for your kind words!  I'm really
excited about this too.  I even used pylab in reason yesterday when I
was teaching a class.

-Matt

On Wed, May 4, 2011 at 12:44 PM, Cameron Hummels
<chummels at astro.columbia.edu> wrote:
> Hey Matt,
>
> Pylab works for me in Reason, but the only issue I'm having is that the
> first plot that reason generates in the console is not aligned to the left
> of the console (I've attached an image).  All subsequent plots seem to be,
> though.  Good work!  This is some great functionality!
>
> Cameron
>
> On 5/3/11 4:36 PM, Matthew Turk wrote:
>
> Hi all,
>
> I added what I think is support for Pylab to the current tip of the yt repo.
>
> What it does is create (dynamically) a new backend that overloads the
> interactivity commands in pylab to dump out images and display them
> inline.  I had to hack around a little bit to make sure that it worked
> if you had specified a GUI engine in your matplotlibrc.
>
> All of the work is done in extdirect_repl.py, in the reason_pylab and
> deliver_image functions.
>
> Anyway, if some people could test it out, see if it works to do things like:
>
> pylab.plot( ... )
>
> and so on and so forth, that'd be great.  I've been using it and it
> works for me, and I'm pretty pumped about having general plotting
> included in Reason, so I'd like to hear if it works for others.
>
> -Matt
>
> _______________________________________________
> Yt-dev mailing list
> Yt-dev at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>
> _______________________________________________
> Yt-dev mailing list
> Yt-dev at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>
>



More information about the yt-dev mailing list