text
result = text(x, y, text, [rotate=], [align=])
Input: x, y, text, rotate, align · Output: result
What it is
Plain text label text (string) placed at (x, y) (numbers, data units), no marker dot -- by default just up and to the right of the point. align= ("left", "center", "right") instead anchors that edge of the text exactly at (x, y), what a label at a computed position needs; rotate= (degrees, anticlockwise) tilts it about that anchor, e.g. a gene name laid at 45 degrees over its arrow.
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
result = text(x, y, text, [rotate=], [align=]) | x string or numberPlain text label text (string) placed at (x, y) (numbers, data units), no marker dot -- by default just up and to the right of the point.y string or numberPlain text label text (string) placed at (x, y) (numbers, data units), no marker dot -- by default just up and to the right of the point.text string or numberPlain text label text (string) placed at (x, y) (numbers, data units), no marker dot -- by default just up and to the right of the point.rotate optionalrotate= (degrees, anticlockwise) tilts it about that anchor, e.g.align optionalalign= ("left", "center", "right") instead anchors that edge of the text exactly at (x, y), what a label at a computed position needs. | result — | Returns a handle with color/text/x/y/size/italic properties. |
Examples
From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.
lab = text(120, 5.35, "6 dB = 1 bit", color = "#0E7C86")
rule = hline(6, dash = true, width = 1.4)
rule.color = lab.color # one ink, stated once
print(rule.color) # "#0e7c86" -- the rule really did pick up the label's colour
output
#0e7c86
from plotting