class_docstr: Base class for all plot objects.
class_docstr_tok: ["Base","class","for","all","plot","objects","."]
docstr: Returns:
      str: Figure rendered in PNG format.
docstr_tok: ["Returns",":","str",":","Figure","rendered","in","PNG","format","."]
code: def to_png(self, **kwargs: Any) -> str:
      """
      Returns:
          str: Figure rendered in PNG format.
      """
      kwargs.pop("format", None)
      kwargs["dpi"] = kwargs.get("dpi", 100)
      data = self._savefig(format="png", **kwargs)
      return base64.b64encode(data).decode("utf-8")
  
imports: from abc import ABC, abstractmethod
  from typing import Generator, Any
  from io import BytesIO
  import contextlib
  import warnings
  import base64
  import textwrap
  from pandas.plotting import register_matplotlib_converters
  import matplotlib
  import matplotlib.pyplot
label_desc: Use image node_id 8 for calling the Figure obj's underlying member method code with example usage: obj.to_png() and returns: base64