Reputation: 109520
Is there a way to change the config file to make jupyter qtconsole run the following command on startup?:
%matplotlib inline
Upvotes: 7
Views: 3854
Reputation: 116
Open the file ~/.ipython/profile_default/ipython_config.py
, and
c.InteractiveShellApp.code_to_run = ''
==>
c.InteractiveShellApp.code_to_run = '%pylab inline'
Upvotes: 1
Reputation: 2898
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')
Upvotes: 4
Reputation: 1130
Add this line to the ipython_config.py
file (not the ipython_qtconsole_config.py
file):
c.InteractiveShellApp.matplotlib = 'inline'
Upvotes: 10