function-plot icon indicating copy to clipboard operation
function-plot copied to clipboard

Could you provide an rest api for function-plot?

Open mokeyish opened this issue 3 years ago • 3 comments

function-plot is a very nice library.

I want to use it in my markdown note. similar as:

![](https://math.now.sh?from=y=x^2+3&color=red&alternateColor=cyan)

and then will display as:

mokeyish avatar Feb 22 '22 09:02 mokeyish

Serving a rendered image of a plot goes beyond what function-plot does, I'd suggest embedding an example that you have in an iframe like this:

<iframe src="https://codesandbox.io/embed/muddy-cdn-ibl5x?fontsize=14&hidenavigation=1&theme=dark"
     style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;"
     title="muddy-cdn-ibl5x"
     allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
     sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
   ></iframe>

mauriciopoppe avatar Feb 22 '22 18:02 mauriciopoppe

Github not support iframe embedding. Image would be better.

mokeyish avatar Feb 23 '22 01:02 mokeyish

Or Intergating function-plot into mermaid was better choice. Since It's not easy to add latex in URL, because of the url encoding.

https://math.yish.org/math_plot.html?y=x%5E2%5C%7Bx%3E0%5C%7D;y=%5Csin(x)%5C%7B-3%3Cx%3C3%5C%7D

Source code

mokeyish avatar Feb 23 '22 01:02 mokeyish

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 08 '22 23:09 stale[bot]