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 nvd
autoplot(x, y, ...)

# S3 method for nvd
plot(x, y, ...)

Arguments

x

A nvd object.

y

A nvd object.

...

Extra arguments to be passed to the plot function.

Value

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.

Examples

gnp_params <- list(p = 1/3)
k_regular_params <- list(k = 8L)
x <- nvd(model = "gnp", n = 10L, model_params = gnp_params)
y <- nvd(model = "k_regular", n = 10L, model_params = k_regular_params)
ggplot2::autoplot(x, y)

plot(x, y)