Fork me on GitHub"

# skbio.tree.TreeNode.ascii_art

`TreeNode.``ascii_art`(show_internal=True, compact=False)

  Returns a string containing an ascii drawing of the tree

  State: Experimental as of 0.4.0.

  Note, this method calls a private recursive function and is not safe for large trees.

  Parameters:

  show_internal : bool

  > includes internal edge names

  compact : bool

  > use exactly one line per tip

  Returns:

  str

  > an ASCII formatted version of the tree

  Examples

      >>> from skbio import TreeNode
      >>> tree = TreeNode.read(["((a,b)c,(d,e)f)root;"])
      >>> print(tree.ascii_art())
                          /-a
                /c-------|
               |          \-b
      -root----|
               |          /-d
                \f-------|
                          \-e