[R] Adjust barplot to the left
squall44
tobias.minder at bluewin.ch
Tue Sep 25 13:23:26 CEST 2007
Hello,
I have the following problem: I created an ecdf and a barplot. Unfortunatly,
the bars are not where I would like them to be (please see picture below).
http://www.nabble.com/file/p12877530/problem.gif
That's my code:
#------------------------
par(mfrow=c(2,1), mar=c(2,3,3,2))
#ECDF
x = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2)
F2.5 <- ecdf(x)
plot(F2.5,
verticals= TRUE,
do.p = TRUE,
lwd=3,
ylab = "",
xlab = "",
main = "Figur 2.12 Frequenztabelle und eVf",
xlim = c(-1,4))
abline(h= (0:10)*0.1)
mtext(text="x", side=1, adj = 1.03, padj=1.23, cex=1.2)
mtext(text="f(x)", side=3, adj = -0.06, padj=-1, cex=1.2)
par(mar=c(4,3,1,2))
#Barplot
width<-c(0.4, 0.4, 0.4)
height<-c(0.5, 0.35, 0.15)
barplot(height,width,xlim=c(-1,4), space=1.5,)
axis(side=1)
#------------------------
Can anyone tell me how I can adjust the bars to the left?
Thanks
Tobias
--
View this message in context: http://www.nabble.com/Adjust-barplot-to-the-left-tf4514904.html#a12877530
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list