[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: |
Thu, 6 Jul 2023 17:54:06 +0800 |
Jack Kamm <jackkamm@gmail.com> 于2023年7月6日周四 11:49写道:
> I would propose the following instead: for ":results output graphics",
> ob-python should plot the gcf, and clear it beforehand. But for
> ":results value graphics", the ob-python block should return a
> matplotlib Figure object to plot, which would allow keeping and
> modifying a Figure between blocks.
>
> I actually proposed that behavior before in this patch:
>
> https://list.orgmode.org/87eenpfe77.fsf@gmail.com/
>
> But never wound up applying it -- the patch was rather large, with a lot
> of extra features, and I wasn't sure they were all worth the extra
> complexity. Then life got in the way, and I never got around to
> revisiting ob-python plotting, until now.
I think your proposal about ":results graphics" is more flexible and
complies the documentation. Since the patch has no real problem and
the feature is useful indeed, I hope it can be merged instead of mine
after the problem of documentation is resolved.
As for other features in the patch, maybe it is better to convert
dict/dataframe/array to table/list only when the result type is
explicitly set to table or list?
Re: [PATCH] ob-python: support header argument `:results file graphics', Jack Kamm, 2023/07/05
Re: [PATCH] ob-python: support header argument `:results file graphics', Jack Kamm, 2023/07/05