def updatePlot(self, plot_num, value_tuple):
# check if we have an existing plot. if not, initialize list of plot
# values.
if not plot_num in self._plots.keys():
self._plots[plot_num] = []
# if no pen has been assigned to this plot, create default
if not plot_num in self._plot_pens.keys():
self._plot_pens[plot_num] = QPen(Qt.blue, 2.0)
# if no draw method has been assigned to this plot, assign default
if not plot_num in self._plot_draw_method.keys():
self._plot_draw_method[plot_num] = 'scatter'
# add value to plot points list
self._plots[plot_num].append(value_tuple)
self.update()
评论列表
文章目录