ryspecs

DESCRIPTION

The set of command-line tools that come with it (called the rytools) use a number of common conventions to specify colors, line styles, font sizes, and other configuration parameters.

The conventions used in the rytools differs slightly from those used when programming with Rayon in Python. For a detailed treatment of the latter, see Conventions Used in Rayon in the Rayon Reference Manual.

COMMAND INVOCATION

For a detailed description of rytool configuration, see ryrc.

All rytools support the following options.

--help
Flag. Print a brief tool description and synopsis of available options and exit.
--input-path <filename>
The name of a file to use as input. If filename is a hyphen (-), standard input will be used.
--output-path <filename>
Required. The name of a file to use as output. The type of file will be inferred from the file extension. Supported extensions (and file formats) are .pdf (Portable Document Format), .png (Portable Network Graphics), .svg (Scalable Vector Graphics), and .ps (PostScript).
--width <num>
The width of the image, as a number of pixels or points. (See SIZE AND DISTANCE.)
--height <num>
The height of the image, as a number of pixels or points. (See SIZE AND DISTANCE.)

COLUMN SPECIFICATION

Many command options require the specification of a column of data from the command’s input. Columns may be specified as a numeric index, where the leftmost column lexicographically in the input is column 0. If the input data has column names (see rydataformat), the names may be used to specify columns as well.

SIZE AND DISTANCE

Two different kinds of rytools conventions exist to specify size or distance. Some options simply take a number of points or pixels:

rytimeseries --annotation-label-spacing=4 ...

Other options take a size specification: a number followed by one of the suffixes “px” or “pt”, representing the number of pixels or points to use for the size/distance. The unit suffixes are interchangeable; the unit used will be the device unit of the output (generally pixels for raster output like PNG and points for vector output like PDF or SVG.)

Relative Sizes

Arguments that take size specifications for font sizes may also accept relative sizes. The exact sizes will be computed with the intent of maintaining the size of the element relative to the dimensions of the image.

Acceptable size specifications are:

  • small
  • normal
  • large
  • x-large
  • xx-large.

SCALES

Many rytools can plot data apply different scales to data before visualization. In general, the following scales are available.

linear
Plot the data on a linear scale.
log
Plot the data on a log scale.
clog
Add the constant value 1 to the data, then plot on a log scale. This introduces some error to the scale (particularly for small non-integer values), but, unlike log, permits the input to contain zeroes.

TICK MARKS

Several rytools use tick mark specifications to express where tick marks should be placed. A tick mark specification is a comma-separated list of tick specifiers, which consist of a specifier type and and (optionally) a set of arguments to customize the time, again separated by commas, for example the following:

ryscatterplot ... --x-ticks at(1,2),min,gt(1000)

Would place ticks on the X axis at the values 1 and 2, the minimum value on the scale, and all points on the scale whose value is greater than 1000.

The possible position specifiers are:

at(pos,...)
Place a tick mark at each of the specified positions on the scale.
every(mod)

Place a tick mark at every position on the scale evenly divisible by mod. For example, on a scale running from 0-10, every(3) will place tick marks at 3, 6 and 9.

If mod is a time delta specification (see DATES AND TIMES) and the column contains datetime data, tick marks will be placed at time points divisible by that interval. For instance, on a scale running from 2001-01-01T01:23:45 to 2001-01-01T01:25:03, every(30s) will place tick marks at 01:24:00 and 01:24:30.

ge(num)
Place a tick mark for each data point whose value is greater than or equal to num.
gt(num)
Place a tick mark for each data point whose value is greater than num.
le(num)
Place a tick mark for each data point whose value is less than or equal to num.
lt(num)
Place a tick mark for each data point whose value is less than num.
max
Place a tick mark at the largest point in the data.
med
Place a tick mark at the median of the data.
min
Place a tick mark at the smallest point in the data.
n(num)
Place n automatically-selected “nice” tick marks on the scale. The tick selection algorithm will try to select exactly n tick marks, but may choose more or less if it cannot find n suitable tick marks.
none
Place no tick marks on the scale. (Use to override defaults.)
p(num)
Place a tick mark at the position marking the n th percentile of the data.
smax
Place a tick mark at the largest point on the scale.
smin
Place a tick mark at the smallest point on the scale.

MARKER SHAPE

The following marker shape styles are available:

arrow
Draw an v-shaped arrow head at the point
dot
Draw a filled dot at the point
circle
Draw an unfilled circle at the point
vline
Draw a vertical line at the point
hline
Draw a horizontal line at the point
cross
Draw a cross at the point
none
Draw nothing at the point

LINE STYLES

A number of line-drawing styles are available in the rytools. For options specifying line styles, the following values are valid:

  • solid
  • dotted
  • dashed
  • dotdash
  • none

COLORS

For specifying colors, Rayon follows the format described in http://www.w3.org/TR/CSS2/syndata.html#color-units and http://www.w3.org/TR/css3-color, with three two exceptions:

  • When specifying colors in hexadecimal notation, the leading octothorpe (#) character may be omitted.
  • Alpha channels are supported in hexadecimal notation as well as in functional notation.
  • The hsl(...) and hsl(...) specification forms are not supported.

For example, here are all the ways to specify a particular shade of blue to the rytools (text following a # character is a comment):

Method Value
Name blue
RGB 00f
RGBA 00ff
RRGGBB 0000ff
RRGGBBAA 0000ffff
RGB (functional) rgb(0, 0, 255)
RGB (functional, percentage) rgb(0%, 0%, 100%)
RGBA (functional) rgb(0, 0, 255, 1.0)
RGBA (functional, percentage) rgb(0%, 0%, 100%, 1.0)

Specifying Colors By Name

The color names Rayon understands are identical to those in the CSS2 and CSS3 standards, reproduced here for convenience.

Name rgba(...) value
aliceblue rgba(240,248,255,255)
antiquewhite rgba(250,235,215,255)
aqua rgba(0,255,255,255)
aquamarine rgba(127,255,212,255)
azure rgba(240,255,255,255)
beige rgba(245,245,220,255)
bisque rgba(255,228,196,255)
black rgba(0,0,0,255)
blanchedalmond rgba(255,235,205,255)
blue rgba(0,0,255,255)
blueviolet rgba(138,43,226,255)
brown rgba(165,42,42,255)
burlywood rgba(222,184,135,255)
cadetblue rgba(95,158,160,255)
chartreuse rgba(127,255,0,255)
chocolate rgba(210,105,30,255)
coral rgba(255,127,80,255)
cornflowerblue rgba(100,149,237,255)
cornsilk rgba(255,248,220,255)
crimson rgba(220,20,60,255)
cyan rgba(0,255,255,255)
darkblue rgba(0,0,139,255)
darkcyan rgba(0,139,139,255)
darkgoldenrod rgba(184,134,11,255)
darkgray rgba(169,169,169,255)
darkgreen rgba(0,100,0,255)
darkgrey rgba(169,169,169,255)
darkkhaki rgba(189,183,107,255)
darkmagenta rgba(139,0,139,255)
darkolivegreen rgba(85,107,47,255)
darkorange rgba(255,140,0,255)
darkorchid rgba(153,50,204,255)
darkred rgba(139,0,0,255)
darksalmon rgba(233,150,122,255)
darkseagreen rgba(143,188,143,255)
darkslateblue rgba(72,61,139,255)
darkslategray rgba(47,79,79,255)
darkslategrey rgba(47,79,79,255)
darkturquoise rgba(0,206,209,255)
darkviolet rgba(148,0,211,255)
deeppink rgba(255,20,147,255)
deepskyblue rgba(0,191,255,255)
dimgray rgba(105,105,105,255)
dimgrey rgba(105,105,105,255)
dodgerblue rgba(30,144,255,255)
firebrick rgba(178,34,34,255)
floralwhite rgba(255,250,240,255)
forestgreen rgba(34,139,34,255)
fuchsia rgba(255,0,255,255)
gainsboro rgba(220,220,220,255)
ghostwhite rgba(248,248,255,255)
gold rgba(255,215,0,255)
goldenrod rgba(218,165,32,255)
gray rgba(128,128,128,255)
green rgba(0,128,0,255)
greenyellow rgba(173,255,47,255)
grey rgba(128,128,128,255)
honeydew rgba(240,255,240,255)
hotpink rgba(255,105,180,255)
indianred rgba(205,92,92,255)
indigo rgba(75,0,130,255)
ivory rgba(255,255,240,255)
khaki rgba(240,230,140,255)
lavender rgba(230,230,250,255)
lavenderblush rgba(255,240,245,255)
lawngreen rgba(124,252,0,255)
lemonchiffon rgba(255,250,205,255)
lightblue rgba(173,216,230,255)
lightcoral rgba(240,128,128,255)
lightcyan rgba(224,255,255,255)
lightgoldenrodyellow rgba(250,250,210,255)
lightgray rgba(211,211,211,255)
lightgreen rgba(144,238,144,255)
lightgrey rgba(211,211,211,255)
lightpink rgba(255,182,193,255)
lightsalmon rgba(255,160,122,255)
lightseagreen rgba(32,178,170,255)
lightskyblue rgba(135,206,250,255)
lightslategray rgba(119,136,153,255)
lightslategrey rgba(119,136,153,255)
lightsteelblue rgba(176,196,222,255)
lightyellow rgba(255,255,224,255)
lime rgba(0,255,0,255)
limegreen rgba(50,205,50,255)
linen rgba(250,240,230,255)
magenta rgba(255,0,255,255)
maroon rgba(128,0,0,255)
mediumaquamarine rgba(102,205,170,255)
mediumblue rgba(0,0,205,255)
mediumorchid rgba(186,85,211,255)
mediumpurple rgba(147,112,219,255)
mediumseagreen rgba(60,179,113,255)
mediumslateblue rgba(123,104,238,255)
mediumspringgreen rgba(0,250,154,255)
mediumturquoise rgba(72,209,204,255)
mediumvioletred rgba(199,21,133,255)
midnightblue rgba(25,25,112,255)
mintcream rgba(245,255,250,255)
mistyrose rgba(255,228,225,255)
moccasin rgba(255,228,181,255)
navajowhite rgba(255,222,173,255)
navy rgba(0,0,128,255)
oldlace rgba(253,245,230,255)
olive rgba(128,128,0,255)
olivedrab rgba(107,142,35,255)
orange rgba(255,165,0,255)
orangered rgba(255,69,0,255)
orchid rgba(218,112,214,255)
palegoldenrod rgba(238,232,170,255)
palegreen rgba(152,251,152,255)
paleturquoise rgba(175,238,238,255)
palevioletred rgba(219,112,147,255)
papayawhip rgba(255,239,213,255)
peachpuff rgba(255,218,185,255)
peru rgba(205,133,63,255)
pink rgba(255,192,203,255)
plum rgba(221,160,221,255)
powderblue rgba(176,224,230,255)
purple rgba(128,0,128,255)
red rgba(255,0,0,255)
rosybrown rgba(188,143,143,255)
royalblue rgba(65,105,225,255)
saddlebrown rgba(139,69,19,255)
salmon rgba(250,128,114,255)
sandybrown rgba(244,164,96,255)
seagreen rgba(46,139,87,255)
seashell rgba(255,245,238,255)
sienna rgba(160,82,45,255)
silver rgba(192,192,192,255)
skyblue rgba(135,206,235,255)
slateblue rgba(106,90,205,255)
slategray rgba(112,128,144,255)
slategrey rgba(112,128,144,255)
snow rgba(255,250,250,255)
springgreen rgba(0,255,127,255)
steelblue rgba(70,130,180,255)
tan rgba(210,180,140,255)
teal rgba(0,128,128,255)
thistle rgba(216,191,216,255)
tomato rgba(255,99,71,255)
turquoise rgba(64,224,208,255)
violet rgba(238,130,238,255)
wheat rgba(245,222,179,255)
white rgba(255,255,255,255)
whitesmoke rgba(245,245,245,255)
yellow rgba(255,255,0,255)
yellowgreen rgba(154,205,50,255)

DATES AND TIMES

To specify dates, times and relative time periods (“time deltas), use the ISO-8601 standard representation. http://www.w3.org/TR/NOTE-datetime describes this standard.

SEE ALSO

rytools(5)