TetraColourSpace uses simple XML-files to describe the graphs. The different elements that may be used are described below, and there is a complete example at the end of this file.
<data>
: The root element containing the graph's data and style information.<style>
: The style element containing style information.<colour>
: Set the colour of an element of the graph.<setting>
: Set a graph setting.<group>
: Indicates a group of data points.<point>
: Describes a data point.<volume>
: Describes a data volume.
The root element containing the graph's data and style information. Anything that occurs outside of this element is excluded.
May only occur once.
Attributes
None
Children
The style element containing style information for the visuals of the graph. This controls e.g. background colour, text colour and the colours of the four corners in the colourspace tetrahedron.
May only occur once, and only as a child of <data>
.
Attributes
None
Children
Sets the colour of an element of the graph itself. It could be e.g. background colour, text colour or the colour of a corner in the colourspace tetrahedron.
May occur several times, but only as a child of <style>
.
Attributes
id
: One ofbackground, text, crosshair, wl_long, wl_medium, wl_short, wl_uv, achro, metric_line, metric_fill, highlight, or selection
Value
A hexadecimal colour value in the format #AARRGGBB
or #RRGGBB
.
Example
<colour id="background">#FFF</colour>
Sets a setting for the graph. It could be e.g. sphere quality or default data point size.
May occur several times, but only as a child of <style>
.
Attributes
id
: One ofpoint_size, corner_size, sphere_quality, or render_mode
.
Value
point_size or corner_size
: A positive, non-zero floating-point value.
sphere_quality
: A positive, non-zero integer. Can not be lower than 5.
render_mode
: fast
(faster rendering, but high RAM usage) or slow
(slower rendering, but low RAM usage).
Example
<setting id="point_size">0.03</setting>
Indicates a group of data points, comparable with a "data series" in e.g. excel.
May occur several times, but only as a child of <data>
.
Attributes
name
: The name of the group. Appears in the legend.shape
: The name of the shape to use for all points in the group. One ofbox, sphere or pyramid
(or15, 16 or 17
, from R's plot character types).
Children
Describes a data point.
May occur several times, but only as a child of <group>
.
Attributes
name
: The name of the point. Appears in the legend and when selected.colour
: The colour of the point in the format#AARRGGBB
or#RRGGBB
.position
: The position of the point in the formattheta,phi,magnitude
; wheretheta
is the angle in the XZ-plane from the x-axis,phi
the angle up/down from the XZ-plane, andmagnitude
the distance from the origin. Floating-point values should use.
as decimal separator, and may use scientific notation.
Example
<point name="Point1" colour="#FFFFFF" position="-0.33,-0.41,0.51"/>
Describes a data point. A quick hull algorithm is applied to the points to generate the volume polygon, discarding all points that are not at the volume's edge. Thus, it is fine to pass entire point clouds as points to a volume element.
May occur several times, but only as a child of <data>
.
Attributes
colour
: The colour of the volume in the format#AARRGGBB
or#RRGGBB
.
Value
A list of data points formatted as point's position
attribute, with one row per point.
Example
<volume colour="#FF0000">
-0.33,-0.41,0.51
-0.34,-0.39,0.49
-0.38,-0.34,0.29
-0.23,-0.60,0.22
</volume>
<?xml version="1.0"?>
<data>
<style>
<colour id="background">#FFFFFF</colour>
<colour id="wl_medium">#77AAFF</colour>
</style>
<group name="Group1" shape="sphere">
<point name="Point1" colour="#FFFFFF" position="-0.33,-0.41,0.51"/>
<point name="Point2" colour="#FFFFFF" position="-0.31,-0.39,0.55"/>
</group>
<group name="Group2" shape="box">
<point name="Point3" colour="#FF00FF" position="-0.56,-0.43,0.31"/>
<point name="Point4" colour="#FF00FF" position="-0.59,-0.42,0.28"/>
</group>
<volume colour="#FF0000">
-0.33,-0.41,0.51
-0.34,-0.39,0.49
-0.38,-0.34,0.29
-0.23,-0.60,0.22
</volume>
</data>