class_docstr: Accessor to ``xgboost``.
docstr: Plot importance based on fitted trees.
  
  Parameters
  ----------
  ax : matplotlib Axes, default None
      Target axes instance. If None, new figure and axes will be created.
  height : float, default 0.2
      Bar height, passed to ax.barh()
  xlim : tuple, default None
      Tuple passed to axes.xlim()
  title : str, default "Feature importance"
      Axes title. To disable, pass None.
  xlabel : str, default "F score"
      X axis title label. To disable, pass None.
  ylabel : str, default "Features"
      Y axis title label. To disable, pass None.
  kwargs :
      Other keywords passed to ax.barh()
  
  Returns
  -------
  ax : matplotlib Axes
code: def plot_importance(
      self,
      ax=None,
      height=0.2,
      xlim=None,
      title="Feature importance",
      xlabel="F score",
      ylabel="Features",
      grid=True,
      **kwargs,
  ):
      """Plot importance based on fitted trees.
  
      Parameters
      ----------
      ax : matplotlib Axes, default None
          Target axes instance. If None, new figure and axes will be created.
      height : float, default 0.2
          Bar height, passed to ax.barh()
      xlim : tuple, default None
          Tuple passed to axes.xlim()
      title : str, default "Feature importance"
          Axes title. To disable, pass None.
      xlabel : str, default "F score"
          X axis title label. To disable, pass None.
      ylabel : str, default "Features"
          Y axis title label. To disable, pass None.
      kwargs :
          Other keywords passed to ax.barh()
  
      Returns
      -------
      ax : matplotlib Axes
      """
  
      import xgboost as xgb
  
      if not isinstance(self._df.estimator, xgb.XGBModel):
          raise ValueError(
              "estimator must be XGBRegressor or XGBClassifier"
          )
      # print(type(self._df.estimator.booster), self._df.estimator.booster)
      return xgb.plot_importance(
          self._df.estimator,
          ax=ax,
          height=height,
          xlim=xlim,
          title=title,
          xlabel=xlabel,
          ylabel=ylabel,
          grid=True,
          **kwargs,
      )
  
file_path: pandas-ml/pandas_ml/xgboost/base.py
imports: from pandas_ml.core.accessor import _AccessorMethods
label_desc: Use image node_id 3 for calling the XGBoostMethods obj's underlying member method code with example usage: obj.plot_importance(ax, height, xlim, title, xlabel, ylabel, grid) and returns: xgb