(cntrPt, parentPt, txtString)
| 38 | va="center", ha="center", bbox=nodeType, arrowprops=arrow_args ) |
| 39 | |
| 40 | def 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 | |
| 45 | def 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 |