You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got an issue when using the pyqtgraph module in python. When I put a white backgrouncolor to a glscatterplot, the scatter dots just vanish. It is like if the color of background was added to the color of the scatterplot therefore everything is white. Here is a piece of the code I use:
If I replace ('w') by ('k') in the setBackgroundColor method the color of scatter is fine, with a black background. did anybody ever get this issue and found a solution to it?
The text was updated successfully, but these errors were encountered:
There is an option for GLScatterPlotItem called glOptions. By default, 'additive' is used (see pyqtgraph.opengl.GLGraphicsItem.GLOptions), so depth testing is disabled. You can change it to 'translucent' like so:
scatterPlotItem.setGLOptions('translucent')
I tested this in the 3D graphics scatter plot example with a white background, and it worked fine. Clouds of points don't look as good as they do with the 'additive' option and a black background, however.
It's more of a workaround than a fix, but I'm not sure what the correct solution is. Perhaps 'additive' could remain as the default, but there should probably be some mention of this in the docs -- maybe in the setBackgroundColor() docstring.
edit: Also, note that there is a bug in GLViewWidget which incorrectly sets the background color (see #194), so only "pure" colors like black, white, red, green, etc. will work.
I've got an issue when using the pyqtgraph module in python. When I put a white backgrouncolor to a glscatterplot, the scatter dots just vanish. It is like if the color of background was added to the color of the scatterplot therefore everything is white. Here is a piece of the code I use:
w = gl.GLViewWidget()
w.setBackgroundColor('w')
w.show()
sp3 = gl.GLScatterPlotItem(pos=np.transpose(pos3), color=rgba_img, size=1, pxMode=False)
w.addItem(sp3)
If I replace ('w') by ('k') in the setBackgroundColor method the color of scatter is fine, with a black background. did anybody ever get this issue and found a solution to it?
The text was updated successfully, but these errors were encountered: