QPlot2D.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:KerbalPie 作者: Vivero 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号