This guide is intended to show the direction of edges based on the aesthetics mapped to its progression, such as changing width, colour and opacity.
guide_edge_direction(title = waiver(), title.position = NULL,
title.theme = NULL, title.hjust = NULL, title.vjust = NULL,
arrow = TRUE, arrow.position = NULL, barwidth = NULL,
barheight = NULL, nbin = 500, direction = NULL, default.unit = "line",
reverse = FALSE, order = 0, ...)
A character string indicating the position of a title. One of "top" (default for a vertical guide), "bottom", "left" (default for a horizontal guide), or "right."
A theme object for rendering the title text. Usually the
object of element_text()
is expected. By default, the theme is
specified by legend.title
in theme()
or theme.
A number specifying horizontal justification of the title text.
A number specifying vertical justification of the title text.
Logical. Should an arrow be drawn to illustrate the direction.
Defaults to TRUE
The position of the arrow relative to the example edge.
A numeric or a grid::unit()
object specifying
the width of the colorbar. Default value is legend.key.width
or
legend.key.size
in theme()
or theme.
A numeric or a grid::unit()
object specifying
the height of the colorbar. Default value is legend.key.height
or
legend.key.size
in theme()
or theme.
A numeric specifying the number of bins for drawing colorbar. A smoother colorbar for a larger value.
A character string indicating the direction of the guide. One of "horizontal" or "vertical."
A character string indicating grid::unit()
for barwidth
and barheight
.
logical. If TRUE
the colorbar is reversed. By default,
the highest value is on the top and the lowest value is on the bottom
positive integer less that 99 that specifies the order of this guide among multiple guides. This controls the order in which multiple guides are displayed, not the contents of the guide itself. If 0 (default), the order is determined by a secret algorithm.
ignored.
# NOT RUN {
gr <- igraph::graph_from_data_frame(highschool)
ggraph(gr, layout = 'kk') +
geom_edge_fan(aes(alpha = ..index..)) +
guides(edge_alpha = guide_edge_direction())
# }
Run the code above in your browser using DataLab