marimo
marimo copied to clipboard
Sage plots support
Description
I want to use marimo with sagemath. For example this code works, but the plot is not displayed.
from sage.all import plot, sin
P = plot(sin, (0,10))
P
Suggested solution
Show the plot
Alternative
No response
Additional context
No response
I am not super familiar with the library, but if the plots are serializable to html, it should not be difficult to add.
We would need to add a custom SageFormatter - similar to this PR: https://github.com/marimo-team/marimo/pull/752
I figured out that this works.
from sage.all import plot, sin
P = plot(sin, (0, 10))
P.matplotlib()
However this is not needed in jupyter notebooks.