distribution.py 文件源码

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

项目:CAAPR 作者: Stargrazer82301 项目源码 文件源码
def add_point(self, x, y, z):

        """
        This function ...
        :return:
        """

        # Add a point to the plotter
        self._plotter.add_point(x, y, z)

        buf = io.BytesIO()

        self._plotter.set_x_limits(self.x_limits[0], self.x_limits[1])
        self._plotter.set_y_limits(self.y_limits[0], self.y_limits[1])
        self._plotter.set_z_limits(self.z_limits[0], self.z_limits[1])
        if self.x_label is not None: self._plotter.set_x_label(self.x_label)
        if self.y_label is not None: self._plotter.set_y_label(self.y_label)
        if self.z_label is not None: self._plotter.set_z_label(self.z_label)
        self._plotter.format = "png"

        self._plotter.density = self.density

        # Run the scatter plotter
        self._plotter.run(buf)

        buf.seek(0)
        im = imageio.imread(buf)
        buf.close()
        self.add_frame(im)

        # Clear the scatter plotter
        self._plotter.clear_figure()

# -----------------------------------------------------------------
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号