MCPcopy Index your code
hub / github.com/rawpython/remi / redraw

Method redraw

examples/matplotlib_app.py:47–59  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

45 self.redraw()
46
47 def redraw(self):
48 canv = FigureCanvasAgg(self._fig)
49 buf = io.BytesIO()
50 canv.print_figure(buf, format='png')
51 with self._buflock:
52 if self._buf is not None:
53 self._buf.close()
54 self._buf = buf
55
56 i = int(time.time() * 1e6)
57 self.attributes['src'] = "/%s/get_image_data?update_index=%d" % (id(self), i)
58
59 super(MatplotImage, self).redraw()
60
61 def get_image_data(self, update_index):
62 with self._buflock:

Callers 3

__init__Method · 0.95
mainMethod · 0.45
on_button_pressedMethod · 0.45

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected