View source: R/autoplotNetwork.R
autoplot.Network | R Documentation |
Generates a ggplot
object. Nice possibility to
visualize 2-dimensional (clustered) networks in the euclidean plane.
## S3 method for class 'Network'
autoplot(
object,
path = NULL,
close.path = FALSE,
path.colour = "gray",
use.opt.tour = FALSE,
...
)
object |
[ |
path |
[ |
close.path |
[ |
path.colour |
[ |
use.opt.tour |
[ |
... |
[any] |
[ggplot
]
## Not run:
# here we have no depots ...
x = generateClusteredNetwork(n.points = 30L, n.cluster = 2L)
pl = autoplot(x, path = 1:3)
# ... and here we have two depots: the path visits the depots in this case
x = generateRandomNetwork(n.points = 30L, n.depots = 2L)
pl = autoplot(x, path = 1:3, path.colour = "tomato")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.