plot.type="functions"
, then years are plotted using a rainbow palette so the
earliest years are red, followed by orange, yellow, green, blue
and indigo with the most recent years plotted in violet.
If plot.type="time"
, then each age is shown as a separate time series in a time plot.## S3 method for class 'demogdata':
plot(x, series=ifelse(!is.null(x$rate),names(x$rate)[1],names(x$pop)[1]),
datatype=ifelse(!is.null(x$rate),"rate","pop"),
years=x$year, ages=x$age, max.age=max(x$age),
transform=(x$type=="mortality"),
plot.type=c("functions","time","depth","density"),
type="l", main=NULL, xlab, ylab,...)
## S3 method for class 'demogdata':
lines(x, series=ifelse(!is.null(x$rate),names(x$rate)[1],names(x$pop)[1]),
datatype=ifelse(!is.null(x$rate),"rate",""),
years=x$year, ages=x$age, max.age=max(x$age),
transform=(x$type=="mortality"),
plot.type=c("functions","time","depth","density"), ...)
## S3 method for class 'demogdata':
points(..., pch = 1)
read.demogdata
or smooth.demogdata
.datatype
.plot
for possible types.points.demogdata
, all arguments are passed to lines.demogdata.
plot(fr.mort)
par(mfrow=c(1,2))
plot(aus.fert,plot.type="time")
plot(aus.fert,plot.type="functions")
Run the code above in your browser using DataLab