From: Jeremie Juste <jeremiejuste@gmail.com>
To: emacs-orgmode@gnu.org
Subject: save plot in python babel
Date: Tue, 25 Aug 2020 14:05:45 +0200 [thread overview]
Message-ID: <87imd7ue06.fsf@gmail.com> (raw)
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
next reply other threads:[~2020-08-25 12:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-25 12:05 Jeremie Juste [this message]
2020-08-25 13:50 ` save plot in python babel Jack Kamm
2020-08-26 21:02 ` Jeremie Juste
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87imd7ue06.fsf@gmail.com \
--to=jeremiejuste@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).