Skip to main content

Visualize Decision Tree without Graphviz.

Project description


it draws Decision Tree not using Graphviz, but only matplotlib.
If interactive == True, it draws Interactive Decision Tree on Notebook.

Output Image using proposed method: dtreeplt (using only matplotlib)


Output Image using conventional method: export_graphviz (Using Graphviz)


Output Image using dtreeplt Interactive Decision Tree



If you want to use the latest version, please use them on git.

pip install git+

when it comes to update, command like below.

pip install git+ -U

Requirements: see requirements.txt
Python 3.6.X.


Quick Start

from dtreeplt import dtreeplt
dtree = dtreeplt()
# If you want to use interactive mode, set the parameter like below.
# dtree.view(interactive=True)

Using trained DecisionTreeClassifier

# You should prepare trained model,feature_names, target_names.
# in this example, use iris datasets.
from sklearn.datasets import load_iris
from sklearn.tree import DecisionTreeClassifier
from dtreeplt import dtreeplt

iris = load_iris()
model = DecisionTreeClassifier(),

dtree = dtreeplt(
fig = dtree.view()
#if you want save figure, use savefig method in returned figure object.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for dtreeplt, version 0.1.43
Filename, size File type Python version Upload date Hashes
Filename, size dtreeplt-0.1.43-py3-none-any.whl (7.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size dtreeplt-0.1.43.tar.gz (6.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page