rtree-style — Style-files for R-tree plotting


The appearance of the plots generated by rtree-eps(1) is controlled by a style-file. This specifies the colours of the fill, and the colours and line-widths of the strokes used in those plots.

The file is in the JSON format, and contains a array of styles for each level (height) of the tree. The style for the bottom-level of the tree (containing the root) comes first in the array.

A style for a level is a JSON object (dictionary) which may have keys fill and stroke. Their values are also JSON objects and should each specify a colour. This may be as greyscale with the key grey (or gray, for the benefit of left-ponders) and a value between 0.0 (black) and 1.0 (white). Alternatively, an RGB colour triple can be specified with the key rgb whose value is an array of three floating point values between 0.0 and 1.0.

A stroke should also contain a key width whose floating-point value is the width of the pen-stroke to draw the outline of the box, in units of (PostScript) point, 1/72 of an inch, about 0.353 mm.

In the case that the fill is absent, then the rectangles will not be filled. Likewise, without a stroke, the rectangles will not be outlined.


The following file specifies styles for two levels; at the bottom level the boxes are filled with a light grey and given a slightly darker grey as outline. At the next level the boxes are filled with middle-blue and outlined with a thinner black line.

    "fill": { "grey": 0.7 },
    "stroke": { "grey": 0.6, "width": 2.0 }
    "fill": { "rgb": [0.0, 0.5, 1.0] },
    "stroke": { "grey": 0.0, "width": 1.0 }


J. J. Green, .


rtree-eps(1) .