| nvd-plot | R Documentation | 
This function generates 2-dimensional plots of samples of networks via multi-dimensional scaling using all representations and distances included in the package.
## S3 method for class 'nvd'
autoplot(object, memberships = rep(1, length(object)), method = "mds", ...)
## S3 method for class 'nvd'
plot(x, method = "mds", ...)
object, x | 
 A list containing two samples of network-valued data stored
as objects of class   | 
memberships | 
 An integer vector specifying the membership of each
network to a specific sample. Defaults to   | 
method | 
 A string specifying which dimensionality reduction method to
use for projecting the samples into the cartesian plane. Choices are
  | 
... | 
 Extra arguments to be passed to the plot function.  | 
Invisibly returns a ggplot object. In
particular, the data set computed to generate the plot can be retrieved via
$data. This is a tibble containing the following
variables:
V1: the x-coordinate of each observation in the plane,
V2: the y-coordinate of each observation in the plane,
Label: the sample membership of each observation,
Representation: the type of matrix representation used to manipulate each
observation,
Distance: the distance used to measure how far each observation is from
the others.
gnp_params <- list(n = 24L, p = 1/3)
degree_params <- list(out_degree = rep(2, 24L), method = "configuration")
x <- nvd(sample_size = 10L, model = "gnp", !!!gnp_params)
y <- nvd(sample_size = 10L, model = "degree", !!!degree_params)
mb <- c(rep(1, length(x)), rep(2, length(y)))
z <- as_nvd(c(x, y))
ggplot2::autoplot(z, memberships = mb)
plot(z, memberships = mb)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.