l_layer_text: Layer a text

View source: R/l_layer.R

l_layer_textR Documentation

Layer a text

Description

Loon's displays that are based on Cartesian coordinates (i.e. scatterplot, histogram and graph display) allow for layering visual information including polygons, text and rectangles.

layer a single character string

Usage

l_layer_text(
  widget,
  x,
  y,
  text,
  color = "gray60",
  size = 6,
  angle = 0,
  label = "text",
  parent = "root",
  index = 0,
  ...
)

Arguments

widget

widget path name as a string

x

coordinate

y

coordinate

text

character string

color

color of text

size

size of the font

angle

rotation of text

label

label used in the layers inspector

parent

group layer

index

of the newly added layer in its parent group

...

additional state initialization arguments, see l_info_states

Details

As a side effect of Tcl's text-based design, it is best to use l_layer_text if one would like to layer a single character string (and not l_layer_texts with n=1).

For more information run: l_help("learn_R_layer")

Value

layer object handle, layer id

See Also

l_layer, l_info_states

Examples

if(interactive()){

p <- l_plot()
l <- l_layer_text(p, 0, 0, "Hello World")

}

loon documentation built on July 9, 2023, 5:48 p.m.