Пример #1
0
 def refresh(self, pose, color=None):
     # self.scatter_graph.seriesList()[0].dataProxy()
     count = self.proxy.itemCount()
     if count == 0:
         for p in pose:
             item = QtDataVisualization.QScatterDataItem()
             item.setPosition(QVector3D(*p))
             self.scatter_graph.seriesList()[0].dataProxy().addItem(item)
     else:
         index = 0
         for p in pose:
             item = QtDataVisualization.QScatterDataItem()
             item.setPosition(QVector3D(*p))
             self.scatter_graph.seriesList()[0].dataProxy().setItem(
                 index, item)
             index += 1
Пример #2
0
 def update_scatter(self):
     data = self.get_data_from_table(col_start=1)
     # reset series
     self.scatterSeries.dataProxy().removeItems(
         0,
         self.scatterSeries.dataProxy().itemCount())
     # add to series
     self.scatterSeries.dataProxy().addItems([
         QtDataVisualization.QScatterDataItem(QVector3D(*i)) for i in data
     ])