Skip to content

Commit c265fd5

Browse files
committed
adding plottype to general plot function
1 parent bb6ec0f commit c265fd5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

treeplot/treeplot.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424

2525
# %% Plot tree
26-
def plot(model, featnames=None, num_trees=0, figsize=(25,25), verbose=3):
26+
def plot(model, featnames=None, num_trees=0, plottype='horizontal', figsize=(25,25), verbose=3):
2727
"""Make tree plot for the input model.
2828
2929
Parameters
@@ -34,6 +34,10 @@ def plot(model, featnames=None, num_trees=0, figsize=(25,25), verbose=3):
3434
list of feature names. The default is None.
3535
num_trees : int, default 0
3636
Specify the ordinal number of target tree
37+
plottype : str, (default : 'horizontal')
38+
Works only in case of xgb model.
39+
* 'horizontal'
40+
* 'vertical'
3741
figsize: tuple, default (25,25)
3842
Figure size, (height, width)
3943
verbose : int, optional

0 commit comments

Comments
 (0)