MCPcopy Index your code
hub / github.com/wepe/MachineLearning / plotMidText

Function plotMidText

DecisionTree/treePlotter.py:40–43  ·  view source on GitHub ↗
(cntrPt, parentPt, txtString)

Source from the content-addressed store, hash-verified

38 va="center", ha="center", bbox=nodeType, arrowprops=arrow_args )
39
40def plotMidText(cntrPt, parentPt, txtString):
41 xMid = (parentPt[0]-cntrPt[0])/2.0 + cntrPt[0]
42 yMid = (parentPt[1]-cntrPt[1])/2.0 + cntrPt[1]
43 createPlot.ax1.text(xMid, yMid, txtString, va="center", ha="center", rotation=30)
44
45def plotTree(myTree, parentPt, nodeTxt):#if the first key tells you what feat was split on
46 numLeafs = getNumLeafs(myTree) #this determines the x width of this tree

Callers 1

plotTreeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected