P
P
Pi-3142016-04-04 11:50:08
Python
Pi-314, 2016-04-04 11:50:08

The mouse event handler slows down the rendering of graphs with a large number of points (500K) in pyqtgraph - a solution?

The mouse event handler slows down the rendering of graphs with a large number of points (500K) in pyqtgraph.
How to win?
PS: noob in programming, all according to the developers, the developers are young, you have to look for solutions in parallel with them as you understand the subject.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
Xitsa, 2016-04-14
@Xitsa

Why draw graphs with a large number of points? At one time, we also faced a similar problem: a drop in performance, but as soon as we realized that the resolution of the chart area is simply not able to display them all: i.e., for example, there are 5-10 points of the chart per pixel, then we immediately found The solution is to output not raw data, but with filtering. Well, maybe this algorithm
will suit you .

X
xmoonlight, 2016-04-15
@xmoonlight

You can use the formula for finding the distance R between two points (x1,y1) and (x2,y2), and use a comparison with a given Rmin.
If the distance is less than the specified Rmin - skip, more or equal - output and connect with the previous (displayed) line.
Also, in addition, you can connect the calculation of adaptive extremes.
It is simpler, faster and more accurate than the SwingingDoor algorithm.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question