Skip to contents

This function uses a tile plot from ggplot2 to display a single numerical value for each of the parameter pairs used to produce the collection of spatial interaction models.

Usage

# S3 method for class 'sim_list'
autoplot(
  object,
  statistics = c("shannon", "renyi", "terminals", "iterations"),
  inverse = TRUE,
  order = 1,
  definition = c("ND", "RW"),
  ...
)

Arguments

object

a collection of spatial interaction models, an object of class sim_list

statistics

the value to display, defaulting to "shannon", see details

inverse

whether to use the cost scale parameter (default)

order

order of the Rényi entropy, used only when definition="renyi"

definition

diversity definition "shannon" (default), "renyi" (see details) or a definition supported by terminals()

...

additional parameters (not used currently)

Value

a ggplot object

Details

The value to display is selected with the statistics parameter and defaults to the Shannon diversity with "shannon" (see diversity()). Othervalues include:

  • "renyi" (coupled with the order parameter) for Rényi diversity (see diversity())

  • "terminals" (coupled with the definition parameter) for the number of terminals when the origin and destination locations are identical (see terminals())

  • "iterations" for the number of iterations the [blvim()] model took to converge

The horizontal axis is used by default for the cost scale parameter, that is \(1/\beta\). This is in general easier to read than using the inverse cost scale. The inverse parameter can be used to turn off this feature. The vertical axis is used by default for the return to scale parameter.

Examples

positions <- matrix(rnorm(10 * 2), ncol = 2)
distances <- as.matrix(dist(positions))
production <- rep(1, 10)
attractiveness <- c(2, rep(1, 9))
all_flows <- grid_blvim(
  distances,
  production,
  c(1.25, 1.5, 1.75),
  1 / c(0.25, 0.5, 1),
  attractiveness
)
ggplot2::autoplot(all_flows)