powered by
Constructor for GeomNodeSpace ggproto objects, a variant of geom_point supporting node attributes from GraphSpace objects.
GeomNodeSpace
geom_point
This geom is designed to create node-level aesthetics such as `size`, `fill`, `colour`, or any custom aesthetics defined in `GeomNodeSpace`.
geom_nodespace( mapping = NULL, data = NULL, stat = "identity", position = "identity", ..., na.rm = TRUE, show.legend = NA, inherit.aes = FALSE )
A ggplot2 layer that renders node glyphs defined by `GeomNodeSpace`.
Set of aesthetic mappings created by [ggplot2::aes()]. These mappings apply to the layer and may override global aesthetics.
Either a GraphSpace object or a data frame containing node attributes. If `NULL`, the layer will use the default plot data.
The statistical transformation to use on the data. Defaults to `"identity"`.
Position adjustment, either as a string or the result of a call to a position adjustment function.
Additional parameters passed to the underlying drawing function in `GeomNodeSpace`.
Logical. Should missing values be removed? Defaults to `TRUE`.
Logical or a named logical vector indicating whether this layer should be included in legends.
Logical. If `FALSE` (default), the layer will use aesthetics defined in `mapping`. Set to `TRUE` if this geom should inherit aesthetics from the plot.
`geom_nodespace` understands the following aesthetics:
`x` Horizontal position in `npc` unit (required).
unit
`y` Vertical position in `npc` unit (required).
`size` Node size in `npc` unit (required).
`fill` Node fill colour.
`colour` Node line colour.
`shape` Integer code between 0 and 25 (see points).
points
`linewidth` Line width, using 'lwd' standard graphics unit (see gpar).
gpar
`alpha` Transparency applied to fill and line colour.
GeomNodeSpace, GraphSpace
# Load a demo igraph data('gtoy1', package = 'RGraphSpace') # Create a GraphSpace object gs <- GraphSpace(gtoy1) if (FALSE) { ggplot() + geom_nodespace(aes(x = x, y = y), data = gs) }
Run the code above in your browser using DataLab