I'm curious that a jupyter laptop allows you to embed the plot. I searched %matplotlib inlineon github and did not find the source code ( https://github.com/search?l=python&q=org%3Ajupyter+matplotlib+inline&ref=searchresults&type=Code&utf8=%E2%9C%93 ).
%matplotlib inline
And this is not available in the docs ( http://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-matplotlib ).
Can someone tell me where I can see the source code %matplotlib inline?
You can find the source of matroplatinum magic in jupyter laptop through
%matplotlib?? # view source
From here we will find the code in python3.5/site-packages/IPython/core/magics/pylab.py
python3.5/site-packages/IPython/core/magics/pylab.py
args = magic_arguments.parse_argstring(self.matplotlib, line) if args.list: backends_list = list(backends.keys()) print("Available matplotlib backends: %s" % backends_list) else: gui, backend = self.shell.enable_matplotlib(args.gui) self._show_matplotlib_backend(args.gui, backend)
, , - self.shell.enable_matplotlib. gythub IPython: https://github.com/ipython/ipython/blob/aa586fd81940e557a1df54ecd0478f9d67dfb6b4/IPython/core/magics/pylab.py#L100
interactiveiveshell.py: https://github.com/ipython/ipython/blob/aa586fd81940e557a1df54ecd0478f9d67dfb6b4/IPython/core/interactiveshell.py#L2918-L2961