Description Usage Arguments Value Examples
plot.grapherator
generates a scatterplot of the nodes in the
Euclidean plane. Additionally, the edge weights are visualized. In case of one
weight per edge either a histogram or an empirical distribution function is drawn.
For graphs with two weights per edge a scatterplot is used.
1 2 3 4 5 6 7 8 9 10 |
x |
[ |
y |
Not used at the moment. |
show.cluster.centers |
[ |
highlight.clusters |
[ |
show.edges |
[ |
weight.plot.type |
[ |
... |
[any] |
[list
] A list of ggplot
objects with components
pl.weights
(scatterplot of edge weights) and eventually pl.coords
(scatterplot of
nodes). The latter is NULL
, if graph
has no associated coordinates.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | g = graph(0, 100)
g = addNodes(g, n = 25, generator = addNodesGrid)
g = addEdges(g, generator = addEdgesDelauney)
g = addWeights(g, generator = addWeightsDistance, method = "manhattan")
## Not run:
pls = plot(g, weight.plot.type = "ecdf")
## End(Not run)
g = addWeights(g, generator = addWeightsRandom,
method = rpois, lambda = 0.1)
## Not run:
pls = plot(g, show.edges = FALSE)
## End(Not run)
g = graph(0, 100)
g = addNodes(g, n = 25, generator = addNodesGrid)
g = addNodes(g, n = 9, by.centers = TRUE, generator = addNodesGrid,
lower = c(0, 0), upper = c(7, 7))
g = addEdges(g, generator = addEdgesDelauney)
g = addWeights(g, generator = addWeightsCorrelated, rho = -0.8)
## Not run:
do.call(gridExtra::grid.arrange, plot(g, show.edges = FALSE))
do.call(gridExtra::grid.arrange, plot(g, show.edges = TRUE,
show.cluster.centers = FALSE))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.