Text - almarklein/visvis GitHub Wiki

Visvis supports rendering of text. It has a Label class and a Text class, which are a wibject and a wobject respectively. Both are able to produce a single line of text oriented at a certain angle.

See the text example.

Character support

Characters are available for the following unicode sets:

  • u0020 - u003f numbers
  • u0040 - u00bf alphabet
  • u00c0 - u037f latin
  • u0380 - u03ff greek
  • u2000 - u23ff symbols

Formatting

Text can be formatted using the following constructs (which can be mixed):

  • hello^2 or hello^{there}, makes one or more charactes superscript.
  • hello_2 or hello_{there}, makes one or more charactes subscript.
  • hell\io or hell\i{ohoo}, makes one or more charactes italic.
  • hell\bo or hell\b{ohoo}, makes one or more charactes bold.
  • hello\_there, a backslash escapes, thus keeping the _^ or \ after it.

Mathematical symbols

There are several escape sequences for (mathematical) characters that can be inserted using the backslash (for example \infty). People familiar with Latex know what they do:

Re Im null infty
int iint iiint forall
leq geq approx approxeq
ne in
leftarrow uparrow rightarrow downarrow
Leftarrow Uparrow Rightarrow Downarrow
leftceil rightceil leftfloor rightfloor
times cdot pm
oplus ominus otimes oslash

Note: In case one needs a character that is not in this list, one can always look up its unicode value and use that instead.

Greek

Letters from the greek alfabet can be inserted in the same way (By starting the name with an uppercase letter, the corresponding upper case greek letter is inserted):

alpha beta gamma delta
epsilon zeta eta theta
iota kappa lambda mu
nu xi omicron pi
rho varsigma sigma tau
upsilon phi chi psi
omega
⚠️ **GitHub.com Fallback** ⚠️