code: def plot(
      self, X, x_component=0, y_component=1, color_by=None, **params
  ):
      if color_by is not None:
          params["color"] = color_by
  
      params["tooltip"] = (
          X.index.names
          if isinstance(X.index, pd.MultiIndex)
          else ["index"]
      ) + [
          f"component {x_component}",
          f"component {y_component}",
      ]
  
      eig = self._eigenvalues_summary.to_dict(orient="index")
  
      row_coords = self.row_coordinates(X)
      row_coords.columns = [
          f"component {i}" for i in row_coords.columns
      ]
      row_coords = row_coords.reset_index()
      row_plot = (
          alt.Chart(row_coords)
          .mark_circle()
          .encode(
              alt.X(
                  f"component {x_component}",
                  scale=alt.Scale(zero=False),
                  axis=alt.Axis(
                      title=f"component {x_component} — {eig[x_component]['% of variance'] / 100:.2%}"
                  ),
              ),
              alt.Y(
                  f"component {y_component}",
                  scale=alt.Scale(zero=False),
                  axis=alt.Axis(
                      title=f"component {y_component} — {eig[y_component]['% of variance'] / 100:.2%}"
                  ),
              ),
              **params,
          )
      )
  
      return row_plot.interactive()
  
imports: from __future__ import annotations
  import collections
  import altair
  import numpy
  import pandas
  import sklearn.utils
  from prince import pca, utils
label_desc: Use image node_id 15 for calling the MFA obj's underlying member method code with example usage: obj.plot(X, x_component, y_component, color_by) and returns: row_plot