-
-
Notifications
You must be signed in to change notification settings - Fork 410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue plotting large dataset from Python #68
Comments
Thanks for your issue report ;) I guess this is because the python debug adapter truncates the result which leads to a JSON syntax error... Can you figure out the max length of a string (in characters) when the debug adapter shortens the string? Maybe this constant can be found in the source. The Also, I'm unsure whether this is the right solution if you want to plot millions of points :D May I ask what your usecase is? |
Thanks for the quick response.
I can't go into too many details, but basically we use matplotlib to visualize plots of long time-series of USB commands (5-10 min worth with many commands/second) during debugging. This is clumsy if using the VSCode Remote - Containers extension to use Docker as a local development environment because you have to do some kind of X-forwarding from inside the Docker container to the host. We can save static images using matplotlib but The workaround I had was to run a simple Python http server in the container, and write JSON files via the debugger to plot in using plotly.js (trying to also avoid adding dependencies). ~10s is about the performance I was getting with this method as well, but this also required opening a browser and navigating to |
You could significantly speed up rendering if you render the data to a png image that you then load as base64 encoded string in python. The extension can visualize base64 encoded png strings ;) |
I'm planning to use that feature as well! For this we really like having interactive plotting, though, because it's useful to zoom in to the ms/µs level. I could also implement this with a time-window before serializing to JSON, but that's not as nice as the GUI zoom. |
This is a great extension! I was considering starting to work on something similar when I found this.
I was hoping to plot some rather large datasets using the plotly visualizer, but ran into an issue.
Plotting with 10k points looks OK:
But it breaks at 10944 points:
The error I get in the Debug Visualizer pane is (truncated):
For reference I would like to plot ~millions of points. I know plotly is capable of this (if a bit slow at times), and I have done it by serializing to JSON and sending to a basic web server before.
Thanks!
The text was updated successfully, but these errors were encountered: