Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

AgTextLabel-class

Class "AgTextLabel": Represents a graphviz text label


Description

This class is used to represent the textlabel object in C from the Graphviz library

Objects from the Class

Objects can be created by calls of the form new("AgTextLabel", ...).

Slots

labelText:

Object of class "character" The actual label text

labelLoc:

Object of class "xyPoint" The location of the label

labelJust:

Object of class "character" The justification of the label

labelWidth:

Object of class "integer" The width of the label

labelColor:

Object of class "character" The color to print the label

labelFontsize:

Object of class "numeric" The font size for the label

Methods

labelText

Retrieves the labelText slot

labelLoc

Retrieves the labelLoc slot

labelJust

Retrieves the labelJust slot

labelWidth

Retrieves the labelWidth slot

labelColor

Retrieves the labelColor slot

labelFontsize

Retrieves the labelFontsize slot

Author(s)

Jeff Gentry

See Also

Examples

V <- letters[1:10]
M <- 1:4
g1 <- randomGraph(V, M, .2)

## Make the labels be the edge weights.  This code is from the vignette
eAttrs <- list()
ew <- edgeWeights(g1)
lw <- unlist(unlist(ew))
toRemove <- removedEdges(g1)
lw <- lw[-toRemove]
names(lw) <- edgeNames(g1)
eAttrs$label <- lw

z <- agopen(g1,"foo", edgeAttrs=eAttrs)
x <- AgEdge(z)  ## list of AgEdge objects
x[[1]]  ## AgEdge
a <- txtLabel(x[[1]])
a ## txtLabel object

labelText(a)
labelLoc(a)
labelJust(a)
labelWidth(a)
labelColor(a)
labelFontsize(a)

Rgraphviz

Provides plotting capabilities for R graph objects

v2.34.0
EPL
Authors
Kasper Daniel Hansen [cre, aut], Jeff Gentry [aut], Li Long [aut], Robert Gentleman [aut], Seth Falcon [aut], Florian Hahne [aut], Deepayan Sarkar [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.