.. _example_tree_plot_iris.py:


================================================================
Plot the decision surface of a decision tree on the iris dataset
================================================================

Plot the decision surface of a decision tree trained on pairs
of features of the iris dataset.

See :ref:`decision tree <tree>` for more information on the estimator.

For each pair of iris features, the decision tree learns decision
boundaries made of combinations of simple thresholding rules inferred from
the training samples.



.. image:: images/plot_iris_001.png
    :align: center




**Python source code:** :download:`plot_iris.py <plot_iris.py>`

.. literalinclude:: plot_iris.py
    :lines: 15-

**Total running time of the example:**  0.52 seconds
( 0 minutes  0.52 seconds)