emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH] ob-python: support header argument `:results file graphics'


From: Liu Hui
Subject: Re: [PATCH] ob-python: support header argument `:results file graphics'
Date: Wed, 5 Jul 2023 16:09:26 +0800

Ihor Radchenko <yantar92@posteo.net> 于2023年7月4日周二 19:29写道:

> That said, your patch should still work fine even with these
> considerations. But we may need to sort out this undocumented behaviour.
> Probably, an error like in `org-babel-graphical-output-file' should be
> thrown by `org-babel-generate-file-param'.

Yes. The main concern is that some users may rely on the undocumented
behavior.


> What about
>
> #+begin_src python :file "test.png" :results graphics file
> import matplotlib.pyplot as plt
> plt.plot([1,2,3,4,5])
> plt.savefig('test.png')
> plt.plot([5,4,3,2,1])
> plt.show()
> #+end_src

OK, I think that it is better to turn off the feature by default and I
have updated the patch. Inspired by ob-R, some extra header arguments
are supported. Thanks.

Attachment: 0001-ob-python-Graphics-output-enhancement.patch
Description: Text Data


reply via email to

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