1% Generated by roxygen2: do not edit by hand
2% Please edit documentation in R/edge_aes.R
3\name{edge_aes}
4\alias{edge_aes}
5\title{Insert edge aesthetic attributes during edge creation}
6\usage{
7edge_aes(
8  style = NULL,
9  penwidth = NULL,
10  color = NULL,
11  arrowsize = NULL,
12  arrowhead = NULL,
13  arrowtail = NULL,
14  fontname = NULL,
15  fontsize = NULL,
16  fontcolor = NULL,
17  len = NULL,
18  tooltip = NULL,
19  URL = NULL,
20  label = NULL,
21  labelfontname = NULL,
22  labelfontsize = NULL,
23  labelfontcolor = NULL,
24  labeltooltip = NULL,
25  labelURL = NULL,
26  edgetooltip = NULL,
27  edgeURL = NULL,
28  dir = NULL,
29  headtooltip = NULL,
30  headURL = NULL,
31  headclip = NULL,
32  headlabel = NULL,
33  headport = NULL,
34  tailtooltip = NULL,
35  tailURL = NULL,
36  tailclip = NULL,
37  taillabel = NULL,
38  tailport = NULL,
39  decorate = NULL
40)
41}
42\arguments{
43\item{style}{The edge line style. The \code{style} types that can be used are
44\code{solid}, \code{bold}, \code{dashed}, \code{dotted}, \code{tapered}, and \code{invisible}.}
45
46\item{penwidth}{The thickness of the stroke line for the edge itself.}
47
48\item{color}{The color of the edge. Can be an X11 color or a hexadecimal
49color code.}
50
51\item{arrowsize}{A scaling factor for arrowheads. The default value is \code{1.0}
52and the minimum is \code{0}.}
53
54\item{arrowhead}{The type of arrowhead to use. The \code{style} attribute can be
55any of these types: \code{normal}, \code{vee}, \code{tee}, \code{dot}, \code{diamond}, \code{box},
56\code{curve}, \code{icurve}, \code{inv}, \code{crow}, or \code{none}.}
57
58\item{arrowtail}{The type of arrowtail to use. The \code{style} attribute can any
59of these types: \code{normal}, \code{vee}, \code{tee}, \code{dot}, \code{diamond}, \code{box}, \code{curve},
60\code{icurve}, \code{inv}, \code{crow}, or \code{none}.}
61
62\item{fontname}{The name of the system font that will be used for any edge
63text.}
64
65\item{fontsize}{The point size of the font used for any edge text.}
66
67\item{fontcolor}{The color used for any edge text. Can be an X11 color or a
68hexadecimal color code.}
69
70\item{len}{The preferred edge length for an edge, in inches. Default value is
71\code{1.0}.}
72
73\item{tooltip}{Text for a tooltip that appears when hovering over an edge. If
74text is not provided, then the default tooltip text will provide the edge
75definition (i.e., \verb{[id]->[id] or [id]--[id]}).}
76
77\item{URL}{A URL to associate with an edge. Upon rendering the plot, clicking
78edges with any associated URLs will open the URL in the default browser.}
79
80\item{label}{The label text associated with the edge. This text will appear
81near the center of the edge.}
82
83\item{labelfontname}{The name of the system font that will be used for the
84\code{headlabel} and the \code{taillabel} label text. If not set, the \code{fontname}
85value will instead be used.}
86
87\item{labelfontsize}{The point size of the font used for the \code{headlabel} and
88the \code{taillabel} label text. If not set, the \code{fontsize} value will instead
89be used.}
90
91\item{labelfontcolor}{The color used for the label text of the \code{headlabel}
92and the \code{taillabel} label text. If not set, the \code{fontcolor} value will
93instead be used. Can be an X11 color or a hexadecimal color code.}
94
95\item{labeltooltip}{Text for a tooltip that will appear when hovering over
96the main label of an edge (if label text provided in the \code{label} edge
97attribute). If text is not provided and an edge label is visible, then the
98default tooltip text will provide the edge definition (i.e., \verb{[id]->[id] or [id]--[id]}).}
99
100\item{labelURL}{A URL to associate with edge label text. Upon rendering the
101plot, clicking edge labels with any associated URLs will open the URL in
102the default browser.}
103
104\item{edgetooltip}{This option provides a means to specify a tooltip with
105only the non-label parts of an edge. If this is defined, the value
106overrides any \code{tooltip} defined for the edge. This tooltip text is when
107hovering along the edge (even near the head or tail node) unless overridden
108by a \code{headtooltip} or \code{tailtooltip} value.}
109
110\item{edgeURL}{This option provides a means to specify a URL with only the
111non-label parts of an edge. If this is defined, the value overrides any
112\code{URL} defined for the edge. This URL is used along the edge (even near the
113head or tail node) unless overridden by a \code{headURL} or \code{tailURL} value.}
114
115\item{dir}{An optional direction type. Normally, for directed graphs, this is
116\code{forward} and needn't be set. For undirected graphs, this would be \code{none}
117and again no explicit setting is required. However, one can also use the
118\code{back} or \code{both} options. The \code{back} option draws an arrowhead in the
119reverse direction of an edge. The \code{both} option draws two arrowheads. When
120using any of these options in such an explicit manner, the \code{head...} and
121\code{tail...} edge attributes allow control over aesthetic edge attributes in
122either side of the edge.}
123
124\item{headtooltip}{This option provides a means to specify a tooltip that can
125be displayed by hovering over the part of an edge that is adjacent to
126incoming node (see the \code{tooltip} argument for further details).}
127
128\item{headURL}{This option provides a means to specify a URL that can be
129accessed by clicking the part of an edge that is adjacent to incoming node
130(see the \code{URL} argument for further details).}
131
132\item{headclip}{If \code{TRUE} (the default behavior), then the head of the
133affected edge is clipped to the node boundary. Using \code{FALSE} places the
134head of the outgoing edge at the center of its node.}
135
136\item{headlabel}{This option provides a means to display a label near the
137part of an edge that is adjacent to incoming node (see the \code{label} argument
138for further details).}
139
140\item{headport}{Allows one to specify which compass position on the incoming
141node the head of the edge will alight. Options are \code{n}, \code{ne}, \code{e}, \code{se},
142\code{s}, \code{sw}, \code{w}, and \code{nw}.}
143
144\item{tailtooltip}{This option provides a means to specify a tooltip that can
145be displayed by hovering over the part of an edge that is adjacent to
146outgoing node (see the \code{tooltip} argument for further details).}
147
148\item{tailURL}{This option provides a means to specify a URL that can be
149accessed by clicking the part of an edge that is adjacent to outgoing node
150(see the \code{URL} argument for further details).}
151
152\item{tailclip}{If \code{TRUE} (the default behavior), then the tail of the
153affected edge is clipped to the node boundary. Using \code{FALSE} places the
154tail of the outgoing edge at the center of its node.}
155
156\item{taillabel}{This option provides a means to display a label near the
157part of an edge that is adjacent to outgoing node (see the \code{label} argument
158for further details).}
159
160\item{tailport}{Allows one to specify which compass position on the outgoing
161node the tail of the edge will be emitted from. Options are \code{n}, \code{ne}, \code{e},
162\code{se}, \code{s}, \code{sw}, \code{w}, and \code{nw}.}
163
164\item{decorate}{If \code{TRUE} then attach any edge label to the edge line via a
1652-segment polyline, underlining the label text and partially overlapping
166the edge line.}
167}
168\description{
169This helper function should be invoked to provide values for the namesake
170\code{edge_aes} argument, which is present in any function where edges are
171created.
172}
173\examples{
174# Create a new graph and add
175# a path with several edge
176# aesthetic attributes
177graph <-
178  create_graph() \%>\%
179  add_path(
180    n = 3,
181    type = "path",
182    edge_aes = edge_aes(
183      style = "dot",
184      color = c("red", "blue")))
185
186# View the graph's internal
187# node data frame; the node
188# aesthetic attributes have
189# been inserted
190graph \%>\%
191  get_edge_df()
192}
193\seealso{
194Other Aesthetics:
195\code{\link{node_aes}()},
196\code{\link{node_edge_aes_data}}
197}
198\concept{Aesthetics}
199