p.col_ord {metools} | R Documentation |
Ordered bar plot
Description
p.col_ord make a ordered bar plot.
Usage
p.col_ord(
data,
xaxis,
yaxis,
ybreaks = 10,
dec = FALSE,
percent = FALSE,
yaccuracy = 0.01,
ydecimalmark = ".",
title = "Title",
xlab = "X axis",
ylab = "Y axis",
stitle = NULL,
note = NULL,
ctitles = "black",
cscales = ctitles,
cbgrid = "white",
clgrid = cbgrid,
cplot = "white",
cserie = "black",
cbserie = cserie,
cticks = "black",
lwdserie = 1,
pnote = 1,
cbord = cplot,
titlesize = 20,
wordssize = 12,
snote = 11,
xlim = NULL
)
Arguments
data |
a dataframe |
xaxis |
x axis data |
yaxis |
y axis data |
ybreaks |
number of y axis breaks (default=10) |
dec |
If TRUE serie come be decrescent,if FALSE crescent(default=F) |
percent |
If TRUE y axis in percent (default=F) |
yaccuracy |
a round for y axis (default=0.01) |
ydecimalmark |
y decimal mark (default=".") |
title |
title of plot |
xlab |
x axis label |
ylab |
y axis label |
stitle |
subtitle |
note |
note |
ctitles |
color of titles (title,xlab,ylab) |
cscales |
color of the scales (default= same ctitles) |
cbgrid |
color of grid background |
clgrid |
color of grid lines |
cplot |
color of plot background |
cserie |
color of serie |
cbserie |
color of serie border (default= same cserie) |
cticks |
color of axis ticks |
lwdserie |
size of serie |
pnote |
position of note (default=1) (only numbers) |
cbord |
color of plot border (default= same cplot) |
titlesize |
size of title (default=20) (only numbers) |
wordssize |
size of words (default=12) (only numbers) |
snote |
size of note (default=11) (only numbers) |
xlim |
limit of x axis (default=NULL) |
Value
Return a graphic.
Examples
v=data.frame("x"=1:5,"y"=c(10,4,8,5,2))
p.col_ord(v,xaxis= v$x,yaxis=v$y)
#or
p.col_ord(v,xaxis= v[[1]],yaxis=v[[2]])
p.col_ord(v,xaxis= v$x,yaxis=v$y,dec=TRUE,percent=FALSE)
p.col_ord(v,xaxis= v$x,yaxis=v$y,dec=TRUE,percent=TRUE)
p.col_ord(v,xaxis= v$x,yaxis=v$y,dec=FALSE,percent=FALSE)
p.col_ord(v,xaxis= v$x,yaxis=v$y,dec=FALSE,percent=TRUE)