edge_aes {DiagrammeR} | R Documentation |
Insert edge aesthetic attributes during edge creation
Description
This helper function should be invoked to provide values for the namesake
edge_aes
argument, which is present in any function where edges are
created.
Usage
edge_aes(
style = NULL,
penwidth = NULL,
color = NULL,
arrowsize = NULL,
arrowhead = NULL,
arrowtail = NULL,
fontname = NULL,
fontsize = NULL,
fontcolor = NULL,
len = NULL,
tooltip = NULL,
URL = NULL,
label = NULL,
labelfontname = NULL,
labelfontsize = NULL,
labelfontcolor = NULL,
labeltooltip = NULL,
labelURL = NULL,
edgetooltip = NULL,
edgeURL = NULL,
dir = NULL,
headtooltip = NULL,
headURL = NULL,
headclip = NULL,
headlabel = NULL,
headport = NULL,
tailtooltip = NULL,
tailURL = NULL,
tailclip = NULL,
taillabel = NULL,
tailport = NULL,
decorate = NULL
)
Arguments
style |
The edge line style. The |
penwidth |
The thickness of the stroke line for the edge itself. |
color |
The color of the edge. Can be an X11 color or a hexadecimal color code. |
arrowsize |
A scaling factor for arrowheads. The default value is |
arrowhead |
The type of arrowhead to use. The |
arrowtail |
The type of arrowtail to use. The |
fontname |
The name of the system font that will be used for any edge text. |
fontsize |
The point size of the font used for any edge text. |
fontcolor |
The color used for any edge text. Can be an X11 color or a hexadecimal color code. |
len |
The preferred edge length for an edge, in inches. Default value is
|
tooltip |
Text for a tooltip that appears when hovering over an edge. If
text is not provided, then the default tooltip text will provide the edge
definition (i.e., |
URL |
A URL to associate with an edge. Upon rendering the plot, clicking edges with any associated URLs will open the URL in the default browser. |
label |
The label text associated with the edge. This text will appear near the center of the edge. |
labelfontname |
The name of the system font that will be used for the
|
labelfontsize |
The point size of the font used for the |
labelfontcolor |
The color used for the label text of the |
labeltooltip |
Text for a tooltip that will appear when hovering over
the main label of an edge (if label text provided in the |
labelURL |
A URL to associate with edge label text. Upon rendering the plot, clicking edge labels with any associated URLs will open the URL in the default browser. |
edgetooltip |
This option provides a means to specify a tooltip with
only the non-label parts of an edge. If this is defined, the value
overrides any |
edgeURL |
This option provides a means to specify a URL with only the
non-label parts of an edge. If this is defined, the value overrides any
|
dir |
An optional direction type. Normally, for directed graphs, this is
|
headtooltip |
This option provides a means to specify a tooltip that can
be displayed by hovering over the part of an edge that is adjacent to
incoming node (see the |
headURL |
This option provides a means to specify a URL that can be
accessed by clicking the part of an edge that is adjacent to incoming node
(see the |
headclip |
If |
headlabel |
This option provides a means to display a label near the
part of an edge that is adjacent to incoming node (see the |
headport |
Allows one to specify which compass position on the incoming
node the head of the edge will alight. Options are |
tailtooltip |
This option provides a means to specify a tooltip that can
be displayed by hovering over the part of an edge that is adjacent to
outgoing node (see the |
tailURL |
This option provides a means to specify a URL that can be
accessed by clicking the part of an edge that is adjacent to outgoing node
(see the |
tailclip |
If |
taillabel |
This option provides a means to display a label near the
part of an edge that is adjacent to outgoing node (see the |
tailport |
Allows one to specify which compass position on the outgoing
node the tail of the edge will be emitted from. Options are |
decorate |
If |
See Also
Other aesthetics:
node_aes()
,
node_edge_aes_data
Examples
# Create a new graph and add
# a path with several edge
# aesthetic attributes
graph <-
create_graph() %>%
add_path(
n = 3,
type = "path",
edge_aes = edge_aes(
style = "dot",
color = c("red", "blue")))
# View the graph's internal
# node data frame; the node
# aesthetic attributes have
# been inserted
graph %>%
get_edge_df()