bigheadG / mmWave

mmWave SDK examples based on Batman Kit mmWave Sensor module
http://www.joybien.com
122 stars 30 forks source link

how to add text or label in Pyqtgraph 3D #19

Closed fateau closed 1 year ago

fateau commented 2 years ago

Hello, how to add text or label in Pyqtgraph 3D?

bigheadG commented 2 years ago

you can reference to

https://stackoverflow.com/questions/56890547/how-to-add-axis-features-labels-ticks-values-to-a-3d-plot-with-glviewwidget

in some version works some version not works. So, I remove paint function

https://github.com/bigheadG/mmWave/blob/master/PC3_v2/PC3_ex3_pyqtgraph_xyz_playback.py If you want to test it you can remove comment out portion and test.

       def paint(self):
    a = 0
    '''
    # For some version gl is ok some get following error
    #Error while drawing item <__main__.CustomTextItem object at 0x7fe379b51a60>

    self.GLViewWidget.qglColor(QtCore.Qt.cyan)
    self.GLViewWidget.renderText(round(self.X), round(self.Y), round(self.Z), self.text)
    '''