emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* save plot in python babel
@ 2020-08-25 12:05 Jeremie Juste
  2020-08-25 13:50 ` Jack Kamm
  0 siblings, 1 reply; 3+ messages in thread
From: Jeremie Juste @ 2020-08-25 12:05 UTC (permalink / raw)
  To: emacs-orgmode


Hello,

I've barely use python with org-mode and I would need some help with the
python setup. I somehow have some trouble saving python plots. Is this the right way
to do it?


#+begin_src python :results output file link :file myfig1.pdf :session *Python*
  import matplotlib
  import numpy as np
  import matplotlib.pyplot as plt
  e_values = np.random.randn(100)
  plt.plot(e_values)
#+end_src


In R things seems to be smoother.

#+begin_src R :results output graphics  :file myfig1.pdf :session *R*
plot(1)
#+end_src

I tried to look around and noticed that the documentation regarding
python with org-mode is aging a bit and there are ob-* all over the
place. [1] ob-ipython does not seem to be maintained, [2] ein on top of ob-python

[1]: https://github.com/gregsexton/ob-ipython
[2]: https://github.com/millejoh/emacs-ipython-notebook


Any help will be appreciated. I'll be ready to improve the documentation of
org-babel python setup as soon as I'm more familiar with it myself.

Best regards,
Jeremie


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-26 21:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-25 12:05 save plot in python babel Jeremie Juste
2020-08-25 13:50 ` Jack Kamm
2020-08-26 21:02   ` Jeremie Juste

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).