1

I'd like to start using Emacs (Spacemacs) for my python work, however, a lot of what I do requires me to interact with the data in the IPython REPL, plot inline graphs, etc.

For example, I might have a python script that filters some signals, then create multiple plots of them, then jump into the REPL to rearrange some data and create more plots.

I know I can just run an IPython interpreter inside Emacs, but it doesn't seem to handle inline plotting. New plots just appear in new windows, and if I'm creating many of them sequentially I have to close the old window before the new plot window shows up.

Ive tried setting python-shell-interpreter-args "-pylab" in my config file, but it doesn't prevent plots from showing in new popup windows.

What do I need to add/change to have plots be shown inside Emacs?

I'd like to stay away from IPython notebooks if at all possible because they're not as portable as regular .py script files.

  • Could you please narrow down your post into a more discrete question (eg, "how do I handle inline plotting")? It's too open-ended right now, but you can break it down into one or more questions (if more than one, please use multiple posts on the one-question-per-post model). – Dan Apr 29 '17 at 13:50
  • Ive edited my question to ask specifically about inline plotting – Simon Apr 29 '17 at 17:51
  • My solution to this is here: kitchingroup.cheme.cmu.edu/blog/2017/01/29/… – John Kitchin Apr 29 '17 at 19:01
  • It seems that requires org/notebooks. I'm looking for a solution that works if I just have a .py script file – Simon Apr 29 '17 at 23:36
  • Have you seen EIN? millejoh.github.io/emacs-ipython-notebook/#customization – Jonathan Apr 30 '17 at 12:36

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.