Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

drawBars

Draw a Linear Barplot on the Current Plot


Description

Draw a linear barplot on the current plot. Fill if desired.

Usage

drawBars(x, y, width, base=0, fill=NULL, ...)

Arguments

x

x-coordinates

y

y-coordinates

width

bar width, computed if missing

base

y-value of the base of each bar

fill

valid R colour to fill the bars

...

further graphical parameters (see par) for the lines function.

Author(s)

Jon T. Schnute, Scientist Emeritus,
Pacific Biological Station, Fisheries and Oceans Canada, Nanaimo BC

Examples

local(envir=.PBSmodEnv,expr={
    if (dev.cur()>1) {
      oldpar=par(no.readonly=TRUE); on.exit(par(oldpar)) }
  plot(0:10,0:10,type="n")
  drawBars(x=1:9,y=9:1,col="deepskyblue4",fill="cyan",lwd=3)
})

PBSmodelling

GUI Tools Made Easy: Interact with Models and Explore Data

v2.68.8
GPL (>= 2)
Authors
Jon T. Schnute [aut], Alex Couture-Beil [aut], Rowan Haigh [aut, cre], Nicholas Boers [ctb], Anisa Egeli [ctb], A. R. Kronlund [ctb], Steve Martell [ctb], Norm Olsen [ctb]
Initial release
2019-03-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.