Learn R Programming

wasim (version 1.1.2)

line_sumrain: Draw line of cumulative rainfall

Description

Add a line with cumulative rainfall data to a plot. The maximum value of the plot has to be passed. If the cumulative rainfall exceeds this maximum, it will start again at 0.

Usage

line_sumrain(xdata, cum_sum_rain, theMax, ...)

Arguments

xdata
Values ploted on the x axis, usually read with read.dates
cum_sum_rain
Vector with the cumulative rain
theMax
The maximum of the y-axis
...
additional arguments passed to lines

Value

Used for its side effect

See Also

See also p.flow_comp

Examples

Run this code
  #Uniform rain
  plot(1:100, rep(1, 100),ylim=c(10,0),type="h", xlab="time", ylab="rainfall")
  line_sumrain(xdata=1:100, cum_sum_rain=(1:100), theMax=10)

Run the code above in your browser using DataLab