1

I realise that tons of people have asked questions about the interactive figure window in IPython but I haven't yet found an answer to my problem. I'm using the IPython qtconsole for plotting, and I'd like it if

 plt.plot(x,y) (plt = matplotlib.pyplot)

would make an interactive figure window pop up BY DEFAULT.

I can get an interactive window for my plot using %pylab qt but I have to use this command every time before plotting, and I'd prefer to just make this a default setting. I am using IPython qtconsole version 3.2.1.

SuperBiasedMan
  • 9,814
  • 10
  • 45
  • 73

1 Answers1

0

Have a look into iPython Profiles. You should be able to either change the "default" profile to set the matplotlib output be going to qt by default or create another profile and have a convenient alias in your shell set up.

Sam Mason
  • 15,216
  • 1
  • 41
  • 60
  • Hi Sam, thanks for your answer. I checked the link you posted, but I think it's a bit advanced for me. Could you be a bit more specific as to where I should look for matplotlib settings? Thanks. – Magdalena Sophie Menz Aug 18 '15 at 12:20
  • just run `ipython profile create` to create a default set of config files—it'll say what it's creating. Then open `~/.ipython/profile_default/ipython_config.py` and set `c.InteractiveShellApp.matplotlib = 'qt'` – Sam Mason Aug 18 '15 at 13:44
  • Sorry didn't work for me - 'ipython profile create' returned a syntax error, but i found the ipython_config.py files in the folder and added the setting you suggested. However nothing changed, I still don't get a figure window (even after restarting the kernel). – Magdalena Sophie Menz Aug 19 '15 at 10:34
  • if you could update the question with more details, exactly what you typed and what output the commands returned. – Sam Mason Aug 20 '15 at 10:14