class_docstr: Accessor to ``xgboost``.
docstr: Plot specified tree.
  
  Parameters
  ----------
  booster : Booster, XGBModel
      Booster or XGBModel instance
  num_trees : int, default 0
      Specify the ordinal number of target tree
  rankdir : str, default "UT"
      Passed to graphiz via graph_attr
  ax : matplotlib Axes, default None
      Target axes instance. If None, new figure and axes will be created.
  kwargs :
      Other keywords passed to to_graphviz
  
  Returns
  -------
  ax : matplotlib Axes
code: def plot_tree(self, num_trees=0, rankdir="UT", ax=None, **kwargs):
      """Plot specified tree.
  
      Parameters
      ----------
      booster : Booster, XGBModel
          Booster or XGBModel instance
      num_trees : int, default 0
          Specify the ordinal number of target tree
      rankdir : str, default "UT"
          Passed to graphiz via graph_attr
      ax : matplotlib Axes, default None
          Target axes instance. If None, new figure and axes will be created.
      kwargs :
          Other keywords passed to to_graphviz
  
      Returns
      -------
      ax : matplotlib Axes
  
      """
  
      import xgboost as xgb
  
      if not isinstance(self._df.estimator, xgb.XGBModel):
          raise ValueError(
              "estimator must be XGBRegressor or XGBClassifier"
          )
      return xgb.plot_tree(
          self._df.estimator,
          num_trees=num_trees,
          rankdir=rankdir,
          **kwargs,
      )
  
file_path: pandas-ml/pandas_ml/xgboost/base.py
imports: from pandas_ml.core.accessor import _AccessorMethods
label_desc: Use image node_id 5 for calling the XGBoostMethods obj's underlying member method code with example usage: obj.plot_tree(num_trees, rankdir, ax) and returns: xgb