Closed drscotthawley closed 1 year ago
Since Transcrypt is converting the Python code to a JavaScript equivalent, most 3rd party Python libraries are not supported unless they are pure Python (including dependencies), and do not rely on any C libraries. NumPy is an exception thanks to the Numscrypt project.
If you are trying to plot Python data in a browser, have you looked into Dash yet?
Thanks for clarifying @JennaSys. I'm one of those people who only uses the "Python Scientific Stack", who often operates as if matplotlib is an integral part of Python, which is obviously untrue.
I'm familiar with Plot.ly products but was under the mistaken impression that they couldn't work offline. I'll look into Dash. (I just took a "Dash" course but it was a different Dash!) Seems like Dash can be bundled & run offline, so that's encouraging. Thanks!
Another alternative, I spent some time last night with Pyodide and got a rough version of my simulation idea working.
Feel free to close this.
An update if it helps, since you are on the data science side of things, you might be interested in the IDOM project that takes an encapsulated though more constrained approach to what Transcrypt does (let's you create front-end web applications with Python).
Maybe it's also worthwhile to take a look at:
http://www.transcrypt.org/live/transcrypt/demos/plotly_demo/plotly_demo.html
Closing this issue due to no further comments.
Hi. Thanks for sharing this tool. I'm sure I'm doing something wrong, but haven't been able to figure out from the docs what that might be.
I was able to run the hello example just fine, but a simple scientific plot fails on line 3. I haven't seen any notes in the documenation about potential matplotlib problems, and haven't noticed other issues or StackOverflow posts about people having trouble with matplotlib, so I assume it's something I'm doing.
Could someone offer any feedback? Thanks. (I will say that I can import matplotlib in my python installation without problems!)
My code reads:
Running transcrypt yields