emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Output result of source block to a file


From: Roger Mason
Subject: Re: [O] Output result of source block to a file
Date: Fri, 07 Jun 2019 07:30:20 -0230
User-agent: mu4e 1.1.0; emacs 26.1

Hello John,

John Kitchin <address@hidden> writes:

> I think you can use something like this:
>
> #+BEGIN_SRC python :results output file :var fname="test.png"
> import matplotlib.pyplot as plt
> import io
>
> f = io.StringIO()
> plt.plot([1, 2, 3, 17])
> plt.savefig(fname)
> print(fname, end='')
> #+END_SRC
>
> It is in Python3.

Thank you.  That works.

Best wishes,
Roger



reply via email to

[Prev in Thread] Current Thread [Next in Thread]