Problem went away on Python 3.7 On Tuesday, July 16, 2019 at 8:34:43 AM UTC-7, Evangelos Petsalis wrote: > > Hi and thanks for the prompt response. > > Unfortunately, this does not seem to be the problem. Actually, the > behavior I see is a bit weird. > When I execute the command to add the line, I can see the line on the app. > Then I add the scattered plots.; both lines and scattered points show > properly until I move the mouse on the app window ... the moment I click on > that window all the lines disappear (including grid lines if present). > > I assume the code that you posted works properly on your machine. Which > python version are you using? > > Thanks again > > > > > On Monday, July 15, 2019 at 5:25:31 PM UTC-7, [email protected] wrote: >> >> Hi. >> >> You are probably missing that your line and scatter plot coordinates >> overlaps and to they have the same color parameters. Try to change those >> parameters as: >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> *import numpy as npimport pyqtgraph as pgimport pyqtgraph.opengl as >> glimport numpy as npv = pg.Qt.QtGui.QApplication([])w = >> gl.GLViewWidget()w.setWindowTitle('pyqtgraph example: GLSurfacePlot')## Add >> a grid to the viewg = gl.GLGridItem()w.addItem(g)## Add Axisa = >> gl.GLAxisItem()w.addItem(a)# add a lineel2 = >> gl.GLLinePlotItem(pos=np.array([[0, 1, 0], [1, 1, 1], [1.5, 1.3, 1.2]]), >> color=[1, 1., 1., 1.], width=10)w.addItem(el2)# add scatter plotsel1 = >> gl.GLScatterPlotItem(pos=np.array([[0, 0, 1], [2, 2, 2],[3, 2, 3], [3, 3, >> 4]]), color=[1, 0.0, 1., 1.], size=10)w.addItem(el1)w.show()while >> w.isVisible(): v.processEvents();* >> >> On Mon, Jul 15, 2019 at 5:06 PM Evangelos Petsalis <[email protected]> >> wrote: >> >>> Hi, >>> >>> I am new to using PyQTGraph but I encountered a very weird issue. >>> Every time I add a ScatterPlotItem, while there is n existing >>> LinePlotItem, the LinePlotItem disappears. >>> Here is the sample code that I run. >>> >>> I am sure I am missing something very simple, but any help would greatly >>> be appreciated. >>> >>> Thanks in advance for the help. >>> >>> >>> >>> >>> import matplotlib.pyplot as plt >>> from mpl_toolkits.mplot3d import Axes3D >>> import numpy as np >>> from pyqtgraph.Qt import QtCore, QtGui >>> import pyqtgraph as pg >>> import pyqtgraph.opengl as gl >>> import pyqtgraph.examples as ex >>> import numpy as np >>> import sys >>> >>> app = QtGui.QApplication([]) >>> w = gl.GLViewWidget() >>> w.setWindowTitle('pyqtgraph example: GLSurfacePlot') >>> >>> ## Add a grid to the view >>> g = gl.GLGridItem() >>> w.addItem(g) >>> >>> ## Add Axis >>> a = gl.GLAxisItem() >>> w.addItem(a) >>> >>> # add a line >>> el2 = gl.GLLinePlotItem(pos=np.array([[0, 0, 1], [1, 1, 1]]), color=[1, >>> 0.0, 1., 1.], width=10) >>> w.addItem(el2) >>> >>> # add scatter plots >>> el1 = gl.GLScatterPlotItem(pos=np.array([[0, 0, 1], [1, 1, 1]]), color=[1, >>> 0.0, 1., 1.], size=10) >>> w.addItem(el1) >>> >>> w.show() >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "pyqtgraph" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/pyqtgraph/d6c54eb5-8188-4267-8449-d17c6dd9e7ac%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/pyqtgraph/d6c54eb5-8188-4267-8449-d17c6dd9e7ac%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >>
-- You received this message because you are subscribed to the Google Groups "pyqtgraph" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/696fc897-588e-4e09-8348-73ce419488b0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
