def METHOD_NAME(self):
    # Ccreate a virtual file which matplotlib can use to save the figure
    buffer = io.BytesIO()
    self.plt.savefig(buffer, dpi=400, bbox_inches="tight")
    buffer.seek(0)
    # Display any kind of image taken from
    # https://github.com/plotly/dash/issues/71
    encoded_image = base64.b64encode(buffer.read())
    return "data:image/png;base64,{}".format(encoded_image.decode())