Hi Jack,
Thanks for your suggestion to use ob-jupyter. That gives me the stdout and
graphical output in separate results blocks as I wanted, and no return
statement is needed. I don't know if there are any side-effects to using
multiple sessions in a single org file, but so far it seems to work qui
On Monday, 24 Feb 2020 at 08:18, Jack Kamm wrote:
> This sounds interesting. Do you know of any documentation or examples
> for :prologue and :epilogue? I checked the Worg page for ob-maxima, but
> it didn't mention these header arguments.
I don't know of any documentation. They basically simply
On Monday, 24 Feb 2020 at 08:17, Jack Kamm wrote:
> 1. noweb (as Eric mentioned). Then you only need to write the code
> once, but note that it will be executed twice.
Doesn't need to execute twice: maybe add ":eval no" to the first block,
the one that will be included in the other one?
--
: Eri
Hi Eric,
"Fraga, Eric" writes:
> Longer term, better would be an implementation of :prologue and
> :epilogue options for python src blocks like we have for Maxima. It
> would probably make sense to provide these options for most if not all
> src blocks?
This sounds interesting. Do you know of
Hi RC,
R C writes:
> My python src blocks often have both graphical output as well as the
> results of some numerical calculation displayed using print statements.
>
> When exported I would like the line: return 'img/ex1.png' not to be
> included in the listing of the src block.
>
> Also, the ou
On Monday, 24 Feb 2020 at 02:13, R C wrote:
> When exported I would like the line: return 'img/ex1.png' not to be
> included in the listing of the src block.
I don't think this is currently possible in the sense you want.
You could use :noweb where you have one src block referring to others
and o
Hi Jack,
Thanks for your response. Sorry for not being clearer.
My python src blocks often have both graphical output as well as the
results of some numerical calculation displayed using print statements.
#+begin_src python :results file
import numpy as np
import matplotlib.pyplot as plt
def f(x):
Sorry, my email had a typo:
> #+begin_src python :session session1 :results output
> x
> #+end_src
That should be ":results value".
Hi RC,
R C writes:
> 1. Is it possible to have both types of output displayed from a single src
> block to avoid having to duplicate the src block, using :exports results
> for one and :exports both for the other?
No, there's no option to output both ":results output" and ":results value".
If
The approach proposed for graphical output at
https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-python.html is
#+begin_src python :results file
import matplotlib, numpy
matplotlib.use('Agg')
import matplotlib.pyplot as plt
fig=plt.figure(figsize=(4,2))
x=numpy.linspace(-15,15)
plt.
10 matches
Mail list logo