plotxyy: plotxyy plots two vectors of numbers against single x-axis

View source: R/rutils.R

plotxyyR Documentation

plotxyy plots two vectors of numbers against single x-axis

Description

plotxyy plots two plots on the single graph so that they share the x-axis. The first series is plotted on the left vertical axis and the second on the right-hand axis.

Usage

plotxyy(
  x,
  y1,
  y2,
  xlab = "",
  ylab1 = "",
  ylab2 = "",
  cex = 0.85,
  fnt = 7,
  colour = c(1, 2),
  defpar = FALSE
)

Arguments

x

the x values

y1

the left-hand axis values

y2

the right-hand axis values

xlab

the x label, default=""

ylab1

the left-hand y label, default=""

ylab2

the right-hand y label, default=""

cex

the size of font on the axes, default=0.85

fnt

the font used on axes, default=7 (bold times)

colour

a vector of two values for the colour of each line, default=c(1,2) black and red

defpar

should the internal 'par' statement be used = defpar=TRUE, or the default=FALSE, which means the plot 'par' will be defined outside the plot.

Value

nothing but it plots a graph

Examples

## Not run: 
x <- 1:20
yval1 <- rnorm(20,mean=5,sd=1)
yval2 <- rnorm(20,mean=10,sd=1)
plotxyy(x,yval1,yval2)

## End(Not run)

haddonm/rutilsMH documentation built on July 21, 2023, 8:46 p.m.