I use jupyter notebook every time``` %matplotlib inline
I wrote,
I thought that if you use it all the time, you should set it first.
The real motivation is when you want to use .ipynb as .py
I get a get_ipython error, so I used this method as a way to avoid it.
# Solution
Display matplotlib graph
```py
%matplotlib inline
Is automatically enabled as follows.
Set the notebook profile. If you have not set it, create it with the following command.
ipython profile create
Edit the resulting ~ / .ipython / profile_default / ipython_config.py
.
# lines of code to run at IPython startup.
# c.InteractiveShellApp.exec_lines = traitlets.Undefined
c.InteractiveShellApp.exec_lines = ['%matplotlib inline']
c.InteractiveShellApp.exec_lines = ['%matplotlib inline']Add a line for.
After that, if you start notebook as usual, `` `% matplotlib inline``` will be enabled automatically.
Recommended Posts