Jack Kamm <jackk...@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....@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?

Reply via email to