Show HN: XY – A Fast, composable, GPU-accelerated interactive plotting library
Posted by apetuskey 4 days ago
Comments
Comment by kasts 4 days ago
Comment by Evidlo 4 days ago
Comment by FuckButtons 3 days ago
Comment by masenf 4 days ago
Comment by apetuskey 4 days ago
We also built this library for extreme customization with CSS/Tailwind support so rendering large amounts of data is an important but not the only advantage.
Comment by mamcx 4 days ago
All UI, honestly, is only meaningful in what the screen size and our vision permit. END.
UNFORTUNATELY, you can't avoid that a user is writing "a___" and the source data has millions of things that start with `a` and all the others are dozens.
So, you can end with a massive influx of data, and sure the user see that big mess and wanna dial in, but in the meantime is nice if the UI not die in the process.
Comment by cycomanic 3 days ago
Comment by Eridrus 3 days ago
Comment by NortySpock 3 days ago
The spiral pattern is an excellent example. "Sure it looks like this when you zoom out, but when you zoom in, you can see the finer structure of the points..."
Comment by cozzyd 3 days ago
it seems a lot of people don't know about histograms...
Comment by formerly_proven 4 days ago
Comment by genxy 4 days ago
Comment by moralestapia 4 days ago
You don't have to justify your decision to people here, literally just move on with your life and forget about it.
Comment by kasts 4 days ago
I tried the library before commenting, it’s a cool project. The performance improvements at larger scales I've found are real. I was mainly just trying to have a conversation to learn where we all learn!
“Just move on” seems like a curious response on a discussion forum, though :)
Comment by moralestapia 4 days ago
Btw, English isn't my first language, so I still struggle with it sometimes. Could you point me to the part of your comment where you asked that question? I can't seem to find it. Thanks!
Comment by kasts 4 days ago
It was not a explicit question where its easy to point at like a question mark (?) but I'd find any comment on a forum like environment to be trying to contribute to a discussion as a whole, where we can all share thoughts and counter thoughts constructively.
Anywhoo, XY seems like a cool lib. If you can find the usecase where you actually can leverage the power you should! Good job on Reflex.
Comment by ahns 4 days ago
Edit: for my use cases, I use napari (~1e7-8 points) if I need true interactivity; otherwise, datashader/holoviz, or even just fast-histogram's 2D histograms work.
For extremely large point clouds, these caveats[0] still apply. It irks me when people make dense scatterplots without any indication of just how dense some portions are.
Still, if it can indeed handle 1e10 points, that's pretty impressive.
[0]: https://datashader.org/user_guide/Plotting_Pitfalls.html
Comment by adhami 4 days ago
Comment by mtweak 4 days ago
One thing that would be useful is to read up on Ed Tufte's principles of data visualization. Many graph libraries don't implement basic visualization principles to make they key point clear, easy to see while still keeping the full depth and complexity of data visible.
Comment by apetuskey 4 days ago
Comment by hantusk 4 days ago
Or plotly-resampler which works on top of plotly and uses the rust package tsdownsample to aggregate on the 4pixels per pixel shown level (to make antialias work)
the grammar of graphics approach really is a great abstraction, and I'd love to see xy work in that direction
Comment by apetuskey 4 days ago
long line and area traces are reduced in Rust using M4 to produce viewportsized extrema, that is then refined as you zoom. Dense scatter plots use a fixed-size density grid plus a representative sample
Comment by HoneySpoons 4 days ago
Comment by rossant 4 days ago
Comment by raychis 4 days ago
Comment by apetuskey 4 days ago
Instead of serializing and sending the full dataset as JSON, it sends compact typed binary buffers and only the screen-relevant data reducing payload size and browser-side work.
More detail here https://github.com/reflex-dev/xy#how-it-works
Comment by NickyHeC 4 days ago
Comment by apetuskey 4 days ago
Comment by airstrike 4 days ago
Comment by apetuskey 4 days ago
Comment by pcpliu 4 days ago
Love rust as the impl.
Comment by ranger_danger 4 days ago
> XY is an extremely fast, interactive, customizable Python charting library
which is it?
Comment by farhan99 4 days ago
Comment by kl01 4 days ago
Comment by apetuskey 4 days ago
Comment by evolabs 3 days ago
Comment by cozzyd 4 days ago
Comment by kl01 4 days ago
Comment by kl01 4 days ago
Comment by VaporJournalAPP 4 days ago