Help - Label

From TreeGraph help
Jump to: navigation, search

Labels are objects that can be assigned to a branch. There are the following types of Labels:

  • Text labels can contain any text that provides information about the branch (e.g. support values for the node the branch leads to).
  • Icon labels mark a branch with a certain icon.
  • Pie chart labels display a pie chart on a branch (e.g. to display the results of an ancestral state reconstruction)

For every label a label ID can be specified. This allows to adjust the formats of different labels in one step if they have the same label ID.

Positioning of labels

Each branch can carry an unlimited number of labels which can be positioned above and below this branch on several levels. Their position can be defined in the element formats dialog by changing three properties:

Position to branch

Defines whether the label should be displayed above or below the branch. (Default value is above.)

Line number

Defines in which line (i.e. on which level) the label is positioned. The closest line to the branch has the index 0. (Default value is 0.)

Line position

Defines the order in which labels in the same line are arranged, where line numbers can be between -2147483648 (-231) and 2147483647 (231 - 1) (Default value is 0). Labels with a lower line number are arranged further left.

Although not recommended, it is also allowed that two labels in one line have the same line position index. In that case the label added first is displayed further left, but you should note that the order of labels with the same line position index might change after some operations (Therefore you should always assign different position indices).

Example of positioning: The line numbers are shown in red and the line positions in blue.

Example

The example in the image on the left shows the usage of line numbers and line position indices. As you can see only line 0 and line 2 are shown and line 1 is left out because there is no label with a line number of 1. If L2 would have a line position index of 1 it would be positioned the same way.

The positioning of L1, L2 and L3 shows that the line positions do not have to follow each other (e.g. 1, 2 and 3).

Label margin

For each label you can define the space that should be left to its neighboring document elements. Margins can be defined in the element formats dialog.

Note that this feature was not available before version 2.0.25 and replaces some document formats which existed in older versions.

See also