processEvents is a QCoreApplication method documented here: https://doc.qt.io/qt-5/qcoreapplication.html#processEvents
On Wednesday, July 3, 2019 4:05:35 AM CEST Radhika Prasad wrote: > Thanks. It works. > Just curious: This command is not mentioned in the documentation so how > does one learn more about it? > > On Monday, July 1, 2019 at 9:28:31 AM UTC+5:30, [email protected] wrote: > > Add to end of your code: > > > > while w.isVisible(): > > app.processEvents() > > > > That's all, > > Vasilije > > > > > > > > On Sun, Jun 30, 2019 at 8:38 PM Radhika Prasad <[email protected] > > > > <javascript:>> wrote: > >> I have tried using the pyqtgraph surface plot example for obtaining a > >> surface plot. Unfortunately, nothing appears. Please help. > >> Even in the example code, if I comment out everything else except for the > >> saddle surface plot, then also nothing appears. > >> > >> Here is the code: > >> > >> from pyqtgraph.Qt import QtCore, QtGui > >> import pyqtgraph as pg > >> import pyqtgraph.opengl as gl > >> import numpy as np > >> > >> ## Create a GL View widget to display data > >> app = QtGui.QApplication([]) > >> w = gl.GLViewWidget() > >> w.show() > >> w.setWindowTitle('pyqtgraph example: GLSurfacePlot') > >> #w.setCameraPosition(distance=50) > >> > >> g = gl.GLGridItem() > >> g.scale(2,2,1) > >> g.setDepthValue(10) # draw grid after surfaces since they may be > >> translucent > >> w.addItem(g) > >> > >> x = np.linspace(-8, 8, 50) > >> y = np.linspace(-8, 8, 50) > >> #z = np.exp((-x.reshape(50,1) ** 2) - (y.reshape(1,50) ** 2)) > >> z = x.reshape(50,1)+y.reshape(1,50) > >> p = gl.GLSurfacePlotItem(x=x, y=y, z=z, shader='normalColor') > >> #p2.translate(-10,-10,0) > >> w.addItem(p) -- +----------------------------------------------------+ Carlos Pascual Izarra Scientific Software Coordinator Computing Division ALBA Synchrotron [http://www.albasynchrotron.es] Carrer de la Llum 2-26 E-08290 Cerdanyola del Valles (Barcelona), Spain E-mail: [email protected] Phone: +34 93 592 4428 +----------------------------------------------------+ -- 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/1681933.LWOg4fAJfT%40pc218. For more options, visit https://groups.google.com/d/optout.
