plotApolloniusGraph {Apollonius}R Documentation

Plot Apollonius graph

Description

Plot an Apollonius graph.

Usage

plotApolloniusGraph(
  apo,
  limits = NULL,
  circles = TRUE,
  fill = TRUE,
  centers = TRUE,
  colors = "distinct",
  distinctArgs = list(seedcolors = c("#ff0000", "#00ff00", "#0000ff")),
  randomArgs = list(hue = "random", luminosity = "dark"),
  ...
)

Arguments

apo

an output of Apollonius

limits

either NULL or a vector of length two passed to the arguments xlim and ylim of plot; if NULL, automatic limits are calculated

circles

Boolean, whether to plot the original sites as circles with the given radii

fill

Boolean, whether to fill the circles if circles=TRUE or to plot only their border

centers

when circles=TRUE and fill=FALSE, whether to plot the centers of the circles

colors

a character string controlling the colors of the sites; "random" to get multiple colors with randomColor, "distinct" to get multiple colors with createPalette, or a color name or a hexadecimal color code

distinctArgs

if colors = "distinct", a list of arguments passed to createPalette

randomArgs

if colors = "random", a list of arguments passed to randomColor

...

arguments passed to plot, such as xlab and ylab

Value

No returned value, called for plotting.

Examples

library(Apollonius)
sites <- rbind(
  c(0, 0),
  c(4, 1),
  c(2, 4),
  c(7, 4),
  c(8, 0),
  c(5, -2),
  c(-4, 4),
  c(-2, -1),
  c(11, 4),
  c(11, 0)
)
radii <- c(1, 1.5, 1.25, 2, 1.75, 0.5, 0.4, 0.6, 0.7, 0.3)
apo <- Apollonius(sites, radii)
opar <- par(mar = c(3, 3, 1, 1))
plotApolloniusGraph(
  apo, fill = FALSE, colors = "random", xlab = NA, ylab = NA
)
par(opar)

[Package Apollonius version 1.0.1 Index]