UI Object that displays one or several labels. This object is typically used as an overlay for an image.

If no data source is specified, a single label will be drawn in the center of the frame. If a data source is defined it will be used to set the center of one or several labels. The positions must be between 0 and 1 unless min and max are specified.

A number of different types of labels are available:

The different labels can be given different colors by specifying a list of colors or a color table for the color attribute.

The text and position of the labels can be controlled using the parameters offset_x and offset_y that shifts the label away from the center. The text can be draw left, right or center-justified by setting the text_anchor parameter. The text size can be set using the size parameter. When the labels show a value, the number of decimals to use are set by the decimals-parameter.

the Label object
Example Label Objects. Top Left. Labels from the list "X,Y,Z". Top Middle. Labels or type numbered with prefix "(" and postfix ")". Top Right. Labels of type xy_value with prefix and postfix brakets. Bottom. Combination of one cross object and two label objects, the first of which uses a list "Yes,No,Maybe" together with text_anchor at end and an offset from the center. The seonc label object consists of coordinates (xy_value) at an offset.

Example XML definition

    module = "MY_MODULE"
    source = "MY_OUTPUT"
    type = "xy_value"
    size = "12"
    color = "red, green, blue"


Attribute Description Default
class must be "Label"  
title title of the object module.source
x placement of the object  
y placement of the object  
w width of the object 1
h height of the object 1
module name of the module to be visualized, if any  
source name of the output to be visualized, if any  
type type of label (labels, alphabetical, numbered, x_value, y_value, z_value, xy_value, value) "labels"
select column to get the data from 0
select_value column to get the value for label from select
text comma separated list of labels
color color of the Label(s) or list of colors "yelow"
size font size 12
text_anchor text anchor position (start, middle, end) "middle"
offset_x offset from center to text anchor 0
offset_y offset from center to text anchor 0
prefix string to put before label
postfix string to put after label
min minimum value for x and y dimensions 0
max maximum value for x and y dimensions 1
min_x minimum value for x dimensions min
max_x maximum value for x dimensions max
min_y minimum value for y dimensions min
max_y maximum value for y dimensions max
flip_y_axis invert coordinate system no


Christian Balkenius
Lund University Cognitive Science