y <- c(93.9,89.8,93.4,101.5,110.4,105.9,108.4,113.9,86.1,69.4,101.2,100.5,98.0,106.6,90.1,96.9,125.9,112.0,100.0,123.9,79.8,83.4,113.6,112.9,104.0,109.9,99.0,106.3,128.9,111.1,102.9,130.0,87.0,87.5,117.6,103.4,110.8,112.6,102.5,112.4,135.6,105.1,127.7,137.0,91.0,90.5,122.4,123.3,124.3,120.0,118.1,119.0,142.7,123.6,129.6,151.6,110.4,99.3,129.1,134.1)
x <- c(101.2,93.1,84.2,85.8,91.8,92.4,80.3,79.7,62.5,57.1,100.8,100.7,86.2,83.2,71.7,77.5,89.8,80.3,78.7,93.8,57.6,60.6,91.0,85.3,77.4,77.3,68.3,69.9,81.7,75.1,69.9,84.0,54.3,60.0,89.9,77.0,85.3,77.6,69.2,75.5,85.7,72.2,79.9,85.3,52.2,61.2,82.4,85.4,78.2,70.2,70.2,69.3,77.5,66.1,69.0,79.2,56.2,64.5,77.4,88.5)
par5 = 'Male'
par4 = 'Female'
par3 = 'TRUE'
par2 = 'grey'
par1 = 'grey'
ylab = ''
main = 'Back to Back Histogram'
#'GNU S' R Code compiled by R2WASP v. 1.0.44 ()
#Author: Prof. Dr. P. Wessa
#To cite this work: Wessa P., (2007), Back to Back Histogram (v1.0.2) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_backtobackhist.wasp/
#Source of accompanying publication: Office for Research, Development, and Education
#Technical description: Write here your technical program description
if (par3 == 'TRUE') par3 <- TRUE
if (par3 == 'FALSE') par3 <- FALSE
library(Hmisc)
z <- data.frame(cbind(x,y))
names(z) <- list(par4,par5)
postscript(file="/var/www/html/rcomp/tmp/1kyyl1197635332.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) 
out <- histbackback(z, probability=par3, main = main, ylab = ylab)
barplot(-out$left, col=par1, horiz=TRUE, space=0, add=TRUE, axes=FALSE)
barplot(out$right, col=par2, horiz=TRUE, space=0, add=TRUE, axes=FALSE)
dev.off()

system("convert tmp/1kyyl1197635332.ps tmp/1kyyl1197635332.png")

