Skip to main content
reformat blockquote
Source Link
jonrsharpe
  • 123.3k
  • 31
  • 277
  • 488

Provided you are running IPython, the %matplotlib inline will make your plot outputs appear and be stored within the notebook.

According to documentation

To set this up, before any plotting or import of matplotlib is performed performed you must execute the %matplotlib magic command. This performs performs the necessary behind-the-scenes setup for IPython to work correctly correctly hand in hand with matplotlib; it does not, however, actually actually execute any Python import commands, that is, no names are added added to the namespace.

 

A particularly interesting backend, provided by IPython, is the    inline backend. This is available only for the Jupyter Notebook and the the Jupyter QtConsole. It can be invoked as follows:

 %matplotlib inline 
%matplotlib inline 

With this backend, the output of plotting commands is displayed inline within within frontends like the Jupyter notebook, directly below the code cell cell that produced it. The resulting plots will then also be stored in the the notebook document.

Provided you are running IPython, the %matplotlib inline will make your plot outputs appear and be stored within the notebook.

According to documentation

To set this up, before any plotting or import of matplotlib is performed you must execute the %matplotlib magic command. This performs the necessary behind-the-scenes setup for IPython to work correctly hand in hand with matplotlib; it does not, however, actually execute any Python import commands, that is, no names are added to the namespace.

 

A particularly interesting backend, provided by IPython, is the  inline backend. This is available only for the Jupyter Notebook and the Jupyter QtConsole. It can be invoked as follows:

 %matplotlib inline 

With this backend, the output of plotting commands is displayed inline within frontends like the Jupyter notebook, directly below the code cell that produced it. The resulting plots will then also be stored in the notebook document.

Provided you are running IPython, the %matplotlib inline will make your plot outputs appear and be stored within the notebook.

According to documentation

To set this up, before any plotting or import of matplotlib is performed you must execute the %matplotlib magic command. This performs the necessary behind-the-scenes setup for IPython to work correctly hand in hand with matplotlib; it does not, however, actually execute any Python import commands, that is, no names are added to the namespace.

A particularly interesting backend, provided by IPython, is the  inline backend. This is available only for the Jupyter Notebook and the Jupyter QtConsole. It can be invoked as follows:

%matplotlib inline 

With this backend, the output of plotting commands is displayed inline within frontends like the Jupyter notebook, directly below the code cell that produced it. The resulting plots will then also be stored in the notebook document.

Source Link
matusko
  • 3.8k
  • 3
  • 24
  • 32

Provided you are running IPython, the %matplotlib inline will make your plot outputs appear and be stored within the notebook.

According to documentation

To set this up, before any plotting or import of matplotlib is performed you must execute the %matplotlib magic command. This performs the necessary behind-the-scenes setup for IPython to work correctly hand in hand with matplotlib; it does not, however, actually execute any Python import commands, that is, no names are added to the namespace.

A particularly interesting backend, provided by IPython, is the inline backend. This is available only for the Jupyter Notebook and the Jupyter QtConsole. It can be invoked as follows:

 %matplotlib inline 

With this backend, the output of plotting commands is displayed inline within frontends like the Jupyter notebook, directly below the code cell that produced it. The resulting plots will then also be stored in the notebook document.