This isn't working for me:
mport matplotlib.pyplot as plt
%pylab inLine
plt.plot([1,2,3,4], [1,4,9,16], 'ro')
plt.axis([0, 6, 0, 20])
plt.show()
Yields:
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-28-119c5663f90a> in <module>()
1 import matplotlib.pyplot as plt
----> 2 get_ipython().magic('pylab inLine')
3
4 plt.plot([1,2,3,4], [1,4,9,16], 'ro')
5
/usr/local/lib/python3.5/dist-packages/IPython/core/interactiveshell.py in magic(self, arg_s)
2161 magic_name, _, magic_arg_s = arg_s.partition(' ')
2162 magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2163 return self.run_line_magic(magic_name, magic_arg_s)
2164
2165 #-------------------------------------------------------------------------
/usr/local/lib/python3.5/dist-packages/IPython/core/interactiveshell.py in run_line_magic(self, magic_name, line)
2082 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
2083 with self.builtin_trap:
-> 2084 result = fn(*args,**kwargs)
2085 return result
2086
<decorator-gen-107> in pylab(self, line)
/usr/local/lib/python3.5/dist-packages/IPython/core/magic.py in <lambda>(f, *a, **k)
191 # but it's overkill for just that one bit of state.
192 def magic_deco(arg):
--> 193 call = lambda f, *a, **k: f(*a, **k)
194
195 if callable(arg):
/usr/local/lib/python3.5/dist-packages/IPython/core/magics/pylab.py in pylab(self, line)
154 import_all = not args.no_import_all
155
--> 156 gui, backend, clobbered = self.shell.enable_pylab(args.gui, import_all=import_all)
157 self._show_matplotlib_backend(args.gui, backend)
158 print ("Populating the interactive namespace from numpy and matplotlib")
/usr/local/lib/python3.5/dist-packages/IPython/core/interactiveshell.py in enable_pylab(self, gui, import_all, welcome_message)
2988 from IPython.core.pylabtools import import_pylab
2989
-> 2990 gui, backend = self.enable_matplotlib(gui)
2991
2992 # We want to prevent the loading of pylab to pollute the user's
/usr/local/lib/python3.5/dist-packages/IPython/core/interactiveshell.py in enable_matplotlib(self, gui)
2937 """
2938 from IPython.core import pylabtools as pt
-> 2939 gui, backend = pt.find_gui_and_backend(gui, self.pylab_gui_select)
2940
2941 if gui != 'inline':
/usr/local/lib/python3.5/dist-packages/IPython/core/pylabtools.py in find_gui_and_backend(gui, gui_select)
260 if gui and gui != 'auto':
261 # select backend based on requested gui
--> 262 backend = backends[gui]
263 else:
264 # We need to read the backend from the original data structure, *not*
KeyError: 'inLine'