class_docstr: Figure object can be used for storing Plotly or Matplotlib figures into Aim repository.
  Core functionality is based on Plotly.
  
  Args:
       obj (:obj:): plotly or matplotlib figure object.
class_docstr_tok: ["Figure","object","can","be","used","for","storing","Plotly","or","Matplotlib","figures","into","Aim","repository",".","Core","functionality","is","based","on","Plotly",".","Args",":","obj","(",":","obj",":",")",":","plotly","or","matplotlib","figure","object","."]
code: def _from_matplotlib_figure(self, obj):
      try:
          from plotly.tools import mpl_to_plotly
      except ModuleNotFoundError:
          raise ModuleNotFoundError(
              "Plotly is required to track matplotlib figure."
          )
  
      try:
          logger.warning(
              'Tracking a matplotlib object using "aim.Figure" might not behave as expected.'
              'In such cases, consider tracking with "aim.Image".'
          )
          for ax in obj.axes:
              for collection in ax.collections:
                  if not hasattr(collection, "get_offset_position"):
                      collection.get_offset_position = (
                          matplotlib_get_offset_position.__get__(
                              collection
                          )
                      )
          plotly_obj = mpl_to_plotly(obj)
      except ValueError as err:
          raise ValueError(
              f"Failed to convert matplotlib figure to plotly figure: {err}"
          )
  
      return self._prepare(plotly_obj)
  
file_path: aim/aim/sdk/objects/figure.py
imports: import logging
  from aim.sdk.num_utils import inst_has_typename
  from aim.storage.object import CustomObject
  from aim.storage.types import BLOB
label_desc: Use image node_id 4 for calling the Figure obj's underlying member method code with example usage: obj._from_matplotlib_figure(obj) and returns: self