| tsbars | R Documentation | 
Function to use bars for time series.
tsbars(x, y, width = "max", yref = 0, gap = 0, vertical = TRUE, ...)
| x | 
 | 
| y | 
 | 
| width | 
 | 
| yref | 
 | 
| gap | 
 | 
| vertical | 
 | 
| ... | Arguments passed to  | 
People often present time series with connected points, although the visual depiction implies a certain process that describes how the values change between the points.
Instead of using simple scatter plots, Barplots can be used to describe series where a single value is the most descriptive of a discreet time bin. The tsbars() function
draws rectangles of different widths with the rect function, to plot series in such a way.
The function has no return value.
# an occurrence-based example
# needed data
  data(stages)
  data(corals)
# calculate diversites
  dd <-divDyn(corals, tax="genus", bin="stg")
# plot range-through diversities
  tsplot(stages, xlim=51:94, ylim=c(0,250), boxes="sys")
  tsbars(x=stages$mid, y=dd$divRT, width=stages$dur, gap=1, col=stages$col)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.