class_docstr: Base class for objects underlying *plot functions.
class_docstr_tok: ["Base","class","for","objects","underlying","*","plot","functions","."]
docstr: Dataframe with numeric x and y, after unit conversion and log scaling.
docstr_tok: ["Dataframe","with","numeric","x","and","y",",","after","unit","conversion","and","log","scaling","."]
code: def comp_data(self):
      """Dataframe with numeric x and y, after unit conversion and log scaling."""
      if not hasattr(self, "ax"):
          # Probably a good idea, but will need a bunch of tests updated
          # Most of these tests should just use the external interface
          # Then this can be re-enabled.
          # raise AttributeError("No Axes attached to plotter")
          return self.plot_data
  
      if not hasattr(self, "_comp_data"):
          comp_data = self.plot_data.copy(deep=False).drop(
              ["x", "y"], axis=1, errors="ignore"
          )
  
          for var in "yx":
              if var not in self.variables:
                  continue
  
              parts = []
              grouped = self.plot_data[var].groupby(
                  self.converters[var], sort=False
              )
              for converter, orig in grouped:
                  orig = orig.mask(orig.isin([np.inf, -np.inf]), np.nan)
                  orig = orig.dropna()
                  if var in self.var_levels:
                      # TODO this should happen in some centralized location
                      # it is similar to GH2419, but more complicated because
                      # supporting `order` in categorical plots is tricky
                      orig = orig[orig.isin(self.var_levels[var])]
                  comp = pd.to_numeric(
                      converter.convert_units(orig)
                  ).astype(float)
                  transform = converter.get_transform().transform
                  parts.append(
                      pd.Series(
                          transform(comp), orig.index, name=orig.name
                      )
                  )
              if parts:
                  comp_col = pd.concat(parts)
              else:
                  comp_col = pd.Series(dtype=float, name=var)
              comp_data.insert(0, var, comp_col)
  
          self._comp_data = comp_data
  
      return self._comp_data
  
imports: from __future__ import annotations
  import warnings
  import itertools
  from copy import copy
  from collections import UserString
  from collections.abc import Iterable, Sequence, Mapping
  from numbers import Number
  from datetime import datetime
  import numpy
  import pandas
  import matplotlib
  from seaborn._core.data import PlotData
  from seaborn.palettes import QUAL_PALETTES, color_palette
  from seaborn.utils import _check_argument, _version_predates, desaturate, locator_to_legend_entries, get_color_cycle, remove_na
label_desc: Use image node_id 10 for calling the VectorPlotter obj's underlying member method code with example usage: obj.comp_data() and returns: self, self