edge_aes {DiagrammeR} | R Documentation |
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.
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)
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 |
# 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()