# Module: tfdf.model_plotter

<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) |

Plotting of decision forest models.

#### Standalone usage:

import tensorflow_decision_forests as tfdf
model = tfdf.keras.CartModel().
model.fit(...)

with open("plot.html", "w") as f:
f.write(tfdf.model_plotter.plot_model(model))

#### Colab usage:

import tensorflow_decision_forests as tfdf
model = tfdf.keras.CartModel().
model.fit(...)

tfdf.model_plotter.plot_model_in_colab(model)

## Classes

[`class DisplayOptions`](https://www.tensorflow.org/decision_forests/api_docs/python/tfdf/model_plotter/DisplayOptions): Display options.

## Functions

[`plot_model(...)`](https://www.tensorflow.org/decision_forests/api_docs/python/tfdf/model_plotter/plot_model): Plots the model structure and its correlation with a dataset.

[`plot_model_in_colab(...)`](https://www.tensorflow.org/decision_forests/api_docs/python/tfdf/model_plotter/plot_model_in_colab): Plots a model structure in colab.

[`plot_tree(...)`](https://www.tensorflow.org/decision_forests/api_docs/python/tfdf/model_plotter/plot_tree): Plots a decision tree.