exported plot.getTree