# tfdf.model_plotter.plot_tree

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/decision-forests/blob/main/tensorflow_decision_forests/component/model_plotter/model_plotter.py#L141-L192) |

Plots a decision tree.

    tfdf.model_plotter.plot_tree(
        tree: https://www.tensorflow.org/decision_forests/api_docs/python/tfdf/py_tree/tree/Tree,
        max_depth: Optional[int] = None,
        display_options: Optional[https://www.tensorflow.org/decision_forests/api_docs/python/tfdf/model_plotter/DisplayOptions] = None
    ) -> str

<br />

<br />

<br />

| ## Args ||
|---|---|
| `tree` | A decision tree. |
| `max_depth` | Maximum plotting depth. Makes the plot more readable in case of large trees. |
| `display_options` | Dictionary of display options. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| The html content displaying the tree. ||

<br />