Closed michaelgoetze closed 3 years ago
Part of the original idea for Eel was to make it easier to develop visualisations that did data processing in Python and visualisation in JS, so I might suggest you rethink your strategy a bit and instead do the hard data work in Python and then send the data across to JS where you can visualise it.
That's totally fine. I just thought there might have been a way to do it.
I might suggest you rethink your strategy a bit and instead do the hard data work in Python and then send the data across to JS where you can visualise it.
This is actually exactly the reason I went for eel. I already wrote some visualization tools in js for a kind of interactive plot that was just not possible in python/matplotlib. But if there would have been a way to combine the strength of these two approaches, it would have been even better.
I can still show plots using matplotlib for now (works for SVG as well) and that is fine. I guessed already that I might not have been possible though. Thanks for replying.
Describe the problem I would like to use matplotlib or plotly for interactive plots using eel. I managed to get a static plot of matplotlib by sending it as base64 encoded bytes. And that works for static images. But is there any way possible to get a dynamic python interface for matplotlib (or plotly)?
Code snippet(s) Here is a working example of my approach to using matplotlib in a static way:
server.py:
web/main.html:
Desktop (please complete the following information):