visualization.py 文件源码

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

项目:pyinduct 作者: pyinduct 项目源码 文件源码
def _update_plot(self):
        """
        update plot window
        """
        for idx, data_set in enumerate(self._data):
            # find nearest time index
            t_idx = ut.find_nearest_idx(self.time_data[idx], self._t)

            # TODO draw grey line if value is outdated

            # update data
            self._plot_data_items[idx].setData(x=self.spatial_data[idx],
                                               y=self.state_data[idx][t_idx])

        self._time_text.setText('t= {0:.2f}'.format(self._t))
        self._t += self._dt
        if self._t > self._endtime:
            self._t = 0
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号