mqr.nbtools.
grab_figure#
- mqr.nbtools.grab_figure(figure, suppress=True)#
Renders the figure to png, base-64 encoded HTML img tag.
The resulting HTML will be rendered if it is the last expression in a cell. It can also be passed to
hstack
orvstack
to arrange plots around other outputs.- Parameters:
- figurematplotlib.figure.Figure
The figure to capture.
- suppressbool, optional
Suppresses the figure by destroying the object. Since this function is used to control how the figure is displayed, the default is to destroy the object after capturing its output.