plot.gn: Plot Methods for Geometric Network related Objects

View source: R/plot.R

plot.gnR Documentation

Plot Methods for Geometric Network related Objects

Description

plot method for geometric networks, point patterns on geometric networks, or a fitted point process.

Usage

## S3 method for class 'gn'
plot(x, ..., title = list(), size = list(), color = list(), frame = FALSE)

## S3 method for class 'gnpp'
plot(
  x,
  ...,
  title = list(),
  size = list(),
  color = list(),
  shape = 1,
  frame = FALSE,
  covariate = NULL
)

## S3 method for class 'gnppfit'
plot(
  x,
  ...,
  title = list(),
  size = list(),
  color = list(),
  shape = 1,
  frame = FALSE,
  data = FALSE,
  trans = "identity",
  select = NULL,
  sol = 100
)

## S3 method for class 'lppfit'
plot(
  x,
  ...,
  title = list(),
  size = list(),
  color = list(),
  shape = 1,
  frame = FALSE,
  data = FALSE,
  trans = "identity",
  sol = 100
)

Arguments

x

An object which is related to a geometric network (object of class gn, gnpp or gnppfit).

...

Other arguments.

title

A named list with names "x", "y" and "plot" which specify the arguments x, y and title of the labs function. Each list entry must be a character vector which has length equal to the number of plots. The list entries can remain unspecified in which case the respective titles are left blank.

size

A named list with names "lines" and "points" which specify the size argument of geom_segment and geom_point, respectively. Each list entry must be a numeric vector of length one with positive values. If the whole list or one entry remains unspecified, default values are used.

color

A named list with names "lines" and "points" which specify the color argument of geom_segment and geom_point. Each list entry must specify a valid color. By default, lines and points are plotted in black.

frame

If set to TRUE, draws a frame around the network and adds tick marks and axis labeling.

shape

The shape used for plotting the points. An integer between 0 and 25. Default to shape = 1 which shows the points as a circle.

covariate

Character vector of length one which is name of the covariate to be plotted. Must be an external categorical covariate with at most ten different values.

data

Set to TRUE if the data shall be plotted on top of the fitted intensity.

trans

The transformation applied to the color bar of the intensity fit. Specifies the trans argument of scale_color_gradient.

select

Allows the plot for a single model term to be selected for printing. e.g. if just the plot for the second smooth should be printed to the console, set select = 2.

sol

Solution of the color network plot.

Value

Invisibly returns an object of class ggplot or a list of ggplot objects.


geonet documentation built on July 11, 2022, 9:08 a.m.