back to back histogram
Last Modified : 13/01/2006 04:57, 16 lines of code
Highlighting powered by highlight
options(digits=3) set.seed(1) require(Hmisc) age <- rnorm(1000,50,10) sex <- sample(c('female','male'),1000,TRUE) out <- histbackback(split(age, sex), probability=TRUE, xlim=c(-.06,.06), main = 'Back to Back Histogram') #! just adding color barplot(-out$left, col="red" , horiz=TRUE, space=0, add=TRUE, axes=FALSE) barplot(out$right, col="blue", horiz=TRUE, space=0, add=TRUE, axes=FALSE)
Requirements
source code
| Download or view | ||
| RGraphGallery(136,9,9) |
packages
The following packages will be needed to produce that graph
| Hmisc |
Keywords
add a keywordjust click a keyword to associate it to that graph. If you don't find what you are looking for, you may also create a new keyword.
3D
bioconductor
Cluster analysis
Dimension:
bivariate
multivariate
univariate
histogram
Mathematical annotations
Quantile regression
Rcore:
colors
core
fonts
system:
graphics
grid
lattice
rgl
triplot
Var:
circular
factor
numeric
TimeSeries
View:
distribution
linear relation
spatial
trees
See also ...
Wiki page
Warning: fopen(http://wiki.r-project.org/rwiki/doku.php?id=graph_gallery:graph136&do=export_raw) [function.fopen]: failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in /mnt/114/free.fr/2/c/addictedtor/graphiques/scriptsphp/bottom_graph.php on line 181
Warning: fread(): supplied argument is not a valid stream resource in /mnt/114/free.fr/2/c/addictedtor/graphiques/scriptsphp/bottom_graph.php on line 182
