0

I like to use org-babel to write tiny python code and drawing with matplotlib. but I can only output drawing or text, I have to switch the org header from "file link" to "output" each time if I want to see print output.

How can I enable both then no need to swich header options?

1 Answer 1

0

I think you want the #+CALL macro. In this example, evaluate the second code block (emacs-lisp), it will first run the R block and then pass its value to the emacs-lisp block. I copied this from the manual, so you may want to read further there about it - chapter 14.

#+NAME: random
#+begin_src R :cache yes
  runif(1)
#+end_src

#+NAME: caller
#+begin_src emacs-lisp :var x=random
  x
#+end_src

#+RESULTS: caller
: 0.397210547933355

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.