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()
# -----------------------------------------------------------------
评论列表
文章目录