Conversation
|
Btw. as @j9ac9k noted in #1011, this might be a third-party bug (not in PyQt5, as it was observed in both PySide2 and PyQt5), so it might also be a good idea to instead of using this workaround, fixing the original bug. Now I sadly can't afford spending that time currently, so I will leave it as it is now. |
|
I'm reluctant to say this is a 3rd party "bug"; as the Looking at the Qt Changelog from 5.13.0 to 5.13.1, we have the following: There is also an update in QGraphicsView Not sure if any of those changes are what's causing this behavior. |
|
Somehow tests are failing for Python 2.7/Qt 4.8... |
|
@2xB if failing for an unrelated reason, would you mind opening a new issue? Maintaining the python2-qt4 pipeline has been a real chore... |
|
I checked the CI builds, Python 2.7 builds are fine otherwise so something in this diff is breaking the test. It may be worth pinging @campagnola on slack to take a look at this one. |
|
Turns out: The reason this test fails only for PyQt4 is probably that there is a larger tolerance in |
|
The higher tolerance for PyQt5 is not intended to be permanent, therefore I created issue #1064 to remember that something has to be done there. It seems btw. that one pixel is off with this change in Python2/PyQt4. If someone is interested in tracking down the reason, feel free to do so! |
|
I'm also interested in getting this fixed in the latest version, as it's causing some issues with my plots as well. I will highlight that, while this solution works, it is causing a performance regression for plots with 10000-1000000 points. |
|
Closing/Opening to re-trigger CI pipelines |
|
Here is the CI run, looks like all python2 pipelines failed: https://dev.azure.com/pyqtgraph/pyqtgraph/_build/results?buildId=633&view=results /shakes-fist-at-python2 We could put this PR on ice until we ship out 0.11 and drop py2 support.... thoughts @2xB ? |
|
Closing/Opening again, CI pipeline should be more robust now... |
| raise Exception('connect argument must be "all", "pairs", "finite", or array') | ||
|
|
||
| arr[1:-1]['c'][non_finite_values] = 0 | ||
| arr[1:-1]['c'][np.roll(non_finite_values,-1)] = 0 |
There was a problem hiding this comment.
I think there's a bug here--roll(-1) moves the first element to the end of the array ?
There was a problem hiding this comment.
The roll was used because the last entry of arr[1:-1]['c'] doesn't matter. Code to test:
import numpy as np
import pyqtgraph as pg
app = pg.mkQApp()
data = np.random.normal(size=10)
data2 = np.copy(data)
data2[0] = np.nan
pg.plot(data, title="no NaN")
pg.plot(data2, title="one NaN")
app.exec_()
Since Qt 5.13.1, paths containing non-finite values are not drawn. This PR avoids passing non-finite values to Qt. Also, as long as
connectis neither'all'nor an array, it also draws paths unconnected at places where a non-finite value occurs.Fixes #1057.