plot-methods: Plot a demographic array

Description Usage Arguments See Also Examples

Description

Methods for function plot which aim to show the main features of a demographic array. Different formats are used for objects of class Counts and Values.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## S4 method for signature 'Counts'
plot(
  x,
  main = NULL,
  cex.main = 1.2,
  col.main = "black",
  font.main = 2,
  las = 1,
  mar = NULL,
  mfrow = NULL,
  ...
)

## S4 method for signature 'Values'
plot(
  x,
  threshold = 20,
  main = NULL,
  cex.main = 1.2,
  col.main = "black",
  font.main = 2,
  las = 1,
  mar = NULL,
  mfrow = NULL,
  ...
)

Arguments

x

Object of class DemographicArray.

main

Title for plot.

cex.main, col.main, font.main

The 'character expansion factor', colour, and font to be used for main.

las

Parameter governing orientation of axis labels. One of 0, 1, 2, or 3. See par.

mar

Size of plotting margins. See par.

mfrow

Layout of multiple plots. See par.

...

Other arguments, which are passed to the underlying plotting functions.

threshold

An integer. If the number of values being plotted per category is less than or equal to threshold then a boxplot is used; otherwise a stripchart is used.

See Also

plot calls functions barchart, boxplot, and stripchart

Examples

1
2
3
4
5
6
library(demdata)
popn <- Counts(VAPopn)
plot(popn)

rates <- Values(VADeaths2)
plot(rates)

StatisticsNZ/dembase documentation built on Dec. 25, 2021, 4:49 p.m.