Documentation
¶
Overview ¶
Package intended to draw phylogenetic trees on different devices :
- Terminal,
- Images (svg, png)
- ...
And with different drawing algorithms. So far, only ASCII form in terminal.
- Circular
- Normal
- Unrooted
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TreeDrawer ¶
type TreeDrawer interface { DrawHLine(x1, x2, y, maxlength, maxheight float64) DrawVLine(x, y1, y2, maxlength, maxheight float64) DrawLine(x1, y1, x2, y2, maxlength, maxheight float64) /* angle : angle of the tip incoming branch */ DrawName(x, y float64, name string, maxlength, maxheight float64, angle float64) Write() }
Generic struct to draw on different supports:
- ascii in terminal
- png
- svg
func NewPngTreeDrawer ¶
func NewPngTreeDrawer(file *os.File, width, height int, leftmargin, rightmargin, topmargin, bottommargin int) TreeDrawer
TextTreeDrawer initializer. TextTreeDraws draws tree as ASCII on stdout or any file. So far: Does not take into account branch lengths.
func NewSvgTreeDrawer ¶
func NewSvgTreeDrawer(file *os.File, width, height int, leftmargin, rightmargin, topmargin, bottommargin int) TreeDrawer
TextTreeDrawer initializer. TextTreeDraws draws tree as ASCII on stdout or any file. So far: Does not take into account branch lengths.
func NewTextTreeDrawer ¶
func NewTextTreeDrawer(file *os.File, width, height int, rightmargin int) TreeDrawer
TextTreeDrawer initializer. TextTreeDraws draws tree as ASCII on stdout or any file. So far: Does not take into account branch lengths.
type TreeLayout ¶
Generic struct that represents tree layout:
- circular
- normal
- unrooted
func NewNormalLayout ¶
func NewNormalLayout(td TreeDrawer, withBranchLengths, withTipLabels bool) TreeLayout
func NewRadialLayout ¶
func NewRadialLayout(td TreeDrawer, withBranchLengths, withTipLabels bool) TreeLayout