[Numpy-discussion] Synonym standards

Derek Homeier derek@astro.physik.uni-goettingen...
Fri Jul 27 14:49:33 CDT 2012


On 27.07.2012, at 8:30PM, Fernando Perez <fperez.net@gmail.com> wrote:

> On Fri, Jul 27, 2012 at 9:43 AM, Derek Homeier
> <derek@astro.physik.uni-goettingen.de> wrote:
>> thanks, that was exactly what I was looking for - together with
>> 
>> c.TerminalIPythonApp.exec_lines = ['import sys',
>>                                   'import numpy as np',
>>                                   'import matplotlib as mpl',
>>                                   'import matplotlib.pyplot as plt']
> 
> Note that if you do this only and don't use %pylab interactively or
> the --pylab flag, then you will *not* get the proper non-blocking
> control of the matplotlib event loop integrated with the terminal or
> qtconsole.
> 
> In summary, following Tony's suggestion is enough to give you:
> 
> - event loop integration when you do --pylab at the prompt or %pylab in ipython.
> - the np, mpl and plt shortcuts
> - no 'import *' at all.
> 
> So that should be sufficient, but you should still use --pylab or
> %pylab to indicate to IPython that you want the mpl event loops to
> work in conjunction with the shell.

Yes, I was aware of that, without the pylab option at least with the macosx backend windows 
either would not draw and refresh properly, or block the shell after a draw() or show(); 
that's why I was asking how to avoid the 'import *' with it. I have not used the %pylab builtin
before, though.

Cheers,
							Derek



More information about the NumPy-Discussion mailing list