Skip to content

Branch label

Overview

Branch label styles provide different ways to highlight and group the tree leaf branches.The annotation properties can be provided in two formats:

  • !groups_class Provides the annotation details for a specified group name or id.
  • Leaf/Branch based annotation details can provided for each leaf along with leaf Name.

Here is an quick example

Please consult our examples trees 'Branch Label style 1', 'Branch Label style 2' in the DEMOS project.

Supported Key-Value pairs

Key (case insensitive) Value Description
text=group name to be displayed any textual/string content Provide a label name to be displayed for the annotation group.
id=some_unique_name any textual/string content without spaces Mandatory for using with !groups_class to represent the group annotation definitions.
color=pink any color name or valid html hex colors such as #FF0000 default color for group lines and labels; default = black
linewidth=2 any integer >= 0 set width of the group line; default = 1; if set to 0, the group line is hidden; valid only when style=1; see examples below
linestyle=dashed if set, a dotted group line will be plotted; default is regular line; valid only when style=1; see examples below
fontcolor=black any color name or valid html hex colors such as #FF0000 default color of group labels; default = black; if omitted, uses 'color'
fontsize=12 any integer set font size; optional; default = 10
fontitalic=1 0 set font italic; optional; default = 0
textalign=middle start or end set text align; optional; default = middle; see the following examples
bkcolor=colorname any color name or valid html hex colors such as #FFFF00 default color for group background; default = lightblue

Data

Each line of the Data section usually consists two parts, separated by a TAB. The first part defines to where the group label will be placed, it can be either:

  • names of two leaf labels, separated by a ',',
  • or a name of a leaf label.

The second part specifics the 'label' (required) and either provide group_class id or settings for this label such as font color, size. See below:

Supported Shapes
triangle
circle
rect
star
check

Visualization styles

Tree

(A:0.1,(B:0.2,(C:0.3,D:0.4)100:0.05)100:0.1)90:0.43;

Style-1

Style 1: branch_label(default style)

(copy & paste the following contents to Evolview to view the visualisation results):

!groups	bad,good
!colors	red,green
!style	branch_label

##class def
!groups_class	id=T1,text=bad,textalign=middle,shape=rect,bkcolor=red,color=black,fontsize=8
!groups_class	id=T2,text=good,textalign=middle,shape=rect,bkcolor=green,color=black,fontsize=8

##data
A	T1
B	T2
C	T2
D	T1

Style-1

Style 1: branch_label(default style) with diffrent shape modifier

##class def
!groups_class	id=T1,text=bad,textalign=middle,shape=circle,bkcolor=red,color=black
!groups_class	id=T2,text=good,textalign=start,shape=circle,bkcolor=green,color=black
!groups_class	id=T3,text=sooo,textalign=end,shape=circle,bkcolor=yellow,color=black

##data
A	T1
B	T2
C,D	T3