Learn R Programming

epade (version 0.2.2)

bar.plot.ade: Bar plot

Description

A function to draw a barplot

Usage

bar.plot.ade(x, y=NULL, z=NULL, data=NULL,
             vnames.x=NULL, vnames.y=NULL, vnames.z=NULL,
             btext=NULL, b=NULL, b2=0.5, v=NULL, h=NULL, gradient=FALSE,
             xlab="", ylab="", main="", ylim=NULL,
             yticks=NULL, col=NULL, tcol=NULL, bgcol=NULL, lcol=NULL,
             alpha=NULL, beside=TRUE, legendon="topright", wall=0,
             lhoriz=NULL, prozent=FALSE, form="r", border=TRUE, density=NULL,
             angle=NULL, density2=NULL, angle2=NULL, fill=NULL, lwd=1, lty=1,
             blwd=1, blty=1)

Arguments

x
  • a factor
a string with the name of the factor variable in the data.frame a formula x~y or x~y+z a table

item

  • y
  • a string with the name of second factor in the data.frame
  • z
  • a string with the name of thirds factor in the data.frame
  • data
  • vnames.x
  • vnames.y
  • vnames.z
  • btext
  • a vector of character strings with test to draw over the bars
  • b
  • b2
  • v
  • h
  • gradient
  • xlab
  • ylab
  • main
  • ylim
  • yticks
  • col
  • tcol
  • bgcol
  • lcol
  • alpha
  • beside
  • legendon
  • "bottom"
  • "bottomleft"
  • "left"
  • "topleft"
  • "top"
  • "topright"
  • "right"
  • "center"
  • "none"
  • wall
  • lhoriz
  • prozent
  • form
  • 'c', 3D Rects
  • 'z': Zylinders (not working well)
  • border
  • density
  • angle
  • density2
  • angle2
  • fill
  • lwd
  • lty
  • blwd
  • blty

itemize

  • 'r': Rects

See Also

bar3d.ade

Examples

Run this code
x<- round(runif(1000, 0.5, 10.5))
bar.plot.ade(x, btext='Uniform distribution', gradient=TRUE)
x<-rbinom(1000, 1, 0.75)
y<-rbinom(1000, 1, 0.30)
z<-rbinom(1000, 1, 0.50)
bar.plot.ade(x,y,z)
bar.plot.ade(x,y,z, wall=4, form='c', main='Bar-Plot')

Run the code above in your browser using DataLab