MCPcopy Create free account
hub / github.com/NanoComp/meep / grab_frame

Method grab_frame

python/visualization.py:1643–1651  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1641 return int(w * self.f.dpi), int(h * self.f.dpi)
1642
1643 def grab_frame(self) -> None:
1644 # Saves the figures frame to memory.
1645 # modified from matplotlib library
1646 from io import BytesIO
1647
1648 bin_data = BytesIO()
1649 self.f.savefig(bin_data, format=self.frame_format)
1650 # imgdata64 = base64.encodebytes(bin_data.getvalue()).decode('ascii')
1651 self._saved_frames.append(bin_data.getvalue())
1652
1653 def _embedded_frames(self, frame_list: list, frame_format: str) -> str:
1654 # converts frame data stored in memory to html5 friendly format

Callers 1

__call__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected