(self)
| 524 | self.fig.savefig(filepath) |
| 525 | |
| 526 | def get_image(self): |
| 527 | canvas = self.canvas |
| 528 | s, (width, height) = canvas.print_to_buffer() |
| 529 | |
| 530 | buffer = np.frombuffer(s, dtype="uint8") |
| 531 | |
| 532 | img_rgba = buffer.reshape(height, width, 4) |
| 533 | rgb, alpha = np.split(img_rgba, [3], axis=2) |
| 534 | return rgb.astype("uint8") |
| 535 | |
| 536 | |
| 537 | class Visualizer: |
nothing calls this directly
no outgoing calls
no test coverage detected