Is there a way to change the config file to make jupyter qtconsole run the following command on startup?:
%matplotlib inline
Add this line to the ipython_config.py
file (not the ipython_qtconsole_config.py
file):
c.InteractiveShellApp.matplotlib = 'inline'
ipython profile create
.
Commented
Dec 15, 2015 at 4:17
In your ipython_config.py
file you can specify commands to run at startup (including magic % commands) by setting c.InteractiveShellApp.exec_lines
. For example,
c.InteractiveShellApp.exec_lines = """
%matplotlib inline
%autoreload 2
import your_favorite_module
""".split('\n')
ipython_config.py
is, by default, under $HOME/.ipython/profile_default/
according to the documentation ipython.readthedocs.io/en/stable/development/config.html
Commented
Sep 3, 2016 at 12:04
Open the file ~/.ipython/profile_default/ipython_config.py
, and
c.InteractiveShellApp.code_to_run = ''
==>
c.InteractiveShellApp.code_to_run = '%pylab inline'