| plot.dynet_metric | R Documentation |
Draws the quantity against time. Node-level measures are drawn as one line per vertex; graph-level measures as one line per measure. Distinctions are carried by colour and line type together, never by colour alone.
## S3 method for class 'dynet_metric'
plot(
x,
type = c("line", "heatmap", "ridge"),
highlight = NULL,
top = NULL,
palette = "okabe",
base_size = 12,
...
)
x |
A |
type |
|
highlight |
Optional character vector naming the series to draw in
colour, with everything else in grey: vertex names for a node-level
measure, measure names for a graph-level one. For a |
top |
How many rows to draw. For a measure taken over time, the |
palette |
Colours for the series: |
base_size |
Base font size. |
... |
Ignored. |
A measure with no time axis, such as reachability or durations(), has no
trajectory to draw and is shown as a bar panel instead, one bar per vertex
or pair and one facet per measure. type and highlight have nothing to
act on there and are ignored.
A ggplot object. Drawing happens when that object is printed, so
the plot is the return value here rather than a side effect.
dn <- dynet(school_contacts)
degree <- centrality_series(dn, measure = "degree")
plot(degree, top = 5)
plot(degree, palette = "extended")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.