+ 1

What's the optimised way to plot 10K data points?

For visualise database i plot them using streamlit,plotly python library, which has X-axis as time in ms and an arrow between every 2 points to show their relation, It's really lagging. What is best optimised method, tool or libarary for my scenario? https://sololearn.com/compiler-playground/cGyLuIzbBxqJ/?ref=app

10th Feb 2025, 1:48 AM
Azhagesanヾ(✿)
Azhagesanヾ(✿) - avatar
5 Answers
+ 4
Azhagesanヾ(✿) perhaps you need to identify where the bottleneck is. is it in data fetching? in the data manipulation? in the presentation? How is it lagging? Perhaps it's a hardware issue? So many questions. Then you can decide what changes you need to make. edit what Python version are you using? streamlit seems to have issues with newer Python versions because of pyarrow being a dependency... perhaps ask the AI for a code using dash instead of streamlit... or if it does not need to be interactive or browser based, just use matplotlib https://stackoverflow.com/questions/63069795/how-can-i-plot-more-10k-points-using-matplotlib
10th Feb 2025, 3:53 AM
Bob_Li
Bob_Li - avatar
+ 3
Azhagesanヾ(✿) do you have a code we can work with to see how it might be optimized ?
10th Feb 2025, 2:36 AM
BroFar
BroFar - avatar
+ 3
maybe this? I https://hvplot.holoviz.org/ https://panel.holoviz.org/ i haven't tried it but it was mentioned in a YT video I watched. https://youtu.be/Nyf0oYWUN18?feature=shared
10th Feb 2025, 3:17 AM
Bob_Li
Bob_Li - avatar
+ 2
BroFar attached the code sir, ChatGPT solution was using slider to lode limited rows of data, some calculation are there to find missing X-axis value based on nearby data points. Any tools or software are fine as long as it displays the output as I want without lag
10th Feb 2025, 3:22 AM
Azhagesanヾ(✿)
Azhagesanヾ(✿) - avatar
+ 2
Bob_Li Thanks for your answer I'll check the documention
10th Feb 2025, 3:29 AM
Azhagesanヾ(✿)
Azhagesanヾ(✿) - avatar