MCPcopy Create free account
hub / github.com/Jack-Cherish/Machine-Learning / plotMidText

Function plotMidText

Decision Tree/Decision Tree.py:276–279  ·  view source on GitHub ↗
(cntrPt, parentPt, txtString)

Source from the content-addressed store, hash-verified

274 2017-07-24
275"""
276def plotMidText(cntrPt, parentPt, txtString):
277 xMid = (parentPt[0]-cntrPt[0])/2.0 + cntrPt[0] #计算标注位置
278 yMid = (parentPt[1]-cntrPt[1])/2.0 + cntrPt[1]
279 createPlot.ax1.text(xMid, yMid, txtString, va="center", ha="center", rotation=30)
280
281"""
282函数说明:绘制决策树

Callers 1

plotTreeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected