osbot_jupyter/kernels/PlotKernel.py
def _to_png(fig):
    """Return a base64-encoded PNG from a
    matplotlib figure."""
    imgdata = BytesIO()
    fig.savefig(imgdata, format='png')
    imgdata.seek(0)
    return urllib.parse.quote(
        base64.b64encode(imgdata.getvalue()))
Return a base64-encoded PNG from a
    matplotlib figure.
Return a base64-encoded PNG from a
matplotlib figure.
Return a base64 - encoded PNG from a matplotlib figure .
def _to_png(fig):
    imgdata = BytesIO()
    fig.savefig(imgdata, format='png')
    imgdata.seek(0)
    return urllib.parse.quote(
        base64.b64encode(imgdata.getvalue()))
def _to_png ( fig ) : imgdata = BytesIO ( ) fig . savefig ( imgdata , format = 'png' ) imgdata . seek ( 0 ) return urllib . parse . quote ( base64 . b64encode ( imgdata . getvalue ( ) ) )
Return a base64-encoded PNG from a
matplotlib figure.
Return a base64 - encoded PNG from a matplotlib figure .
"""Return a base64-encoded PNG from a
    matplotlib figure."""
fig