[IPython-dev] rant: "%matplotlib inline"

Matthias Bussonnier bussonniermatthias at gmail.com
Fri Jul 3 23:57:06 EDT 2015


> On Jul 3, 2015, at 19:21, Brian Blais <bblais at gmail.com> wrote:
> 
> ...
> 
> Is there a way, for example, to programmatically edit the config file
> easily?  That way a simple script could be written to go through some
> of the more common defaults, to personalize it for a particular case.

Yes, the config support son file, so instead of 

c.FooBar.res = value in ipython_kernel.py

you can 

{
“FooBar”:{“res”:value}
}

in `ipython_kernel.json` 


> On Jul 3, 2015, at 20:30, Fernando Perez <fperez.net at gmail.com> wrote:
> 
> 
> This summarizes both the expectation and the reason why we have the problem very well, thanks!
> 
> Here's a possible path forward: when we start a kernel, we record what client started it (honestly I'm not up to speed with the details of the protocol, it's possible we already do this).
> 
> ....
> Thoughts on this proposal?  Would be good if people hash this out next week at Scipy with the MPL team...

The things that start the kernel is a kernel manager, it is not especially aware of wether the notebook started it, or nbconvert, 
or hydrogen, or qtconsole ...
It is not either especially aware of wether the kernel is python or julia, or R. 

The path forward is ti have fig object define a _repr_png_, the we don’t have to deal with %matpltlib inline
the only problem is when the last statement/extression of a cell do not return a fig object, the things that is expected is not really shown. 

Thought, that would make things consistent with the rest of the display machinery. 
-- 
M








More information about the IPython-dev mailing list