Ein eingebundener Text mit undefiniertem Zeichensatz wurde abgetrennt. Name: nicht verf?gbar URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120507/f2dfaa17/attachment.pl>
y-axis-problem (barplots)
3 messages · David Studer, E Atescelik, Berend Hasselman
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120507/ba8a9316/attachment.pl>
On 07-05-2012, at 09:55, David Studer wrote:
Hi everybody!
I would like to plot a barplot, but, unfortunately, when I change the
y-axis limits
the bars do not start at 0 any more but get negative:
#################################################
# Data (just a short example):
a<-c(1.61, 2.1)
b<-c(1.5, 1.9)
c<-c(1.85, 2.2)
d<-c(1.63, 2.3)
x<-rbind(a,b,c,d)
colnames(x)<-c("var1","var2")
# Problem:
barplot(x[,1])
barplot(x[,1], ylim=c(1,2)) # Bars do not start at 0
#################################################
Could anyone help me? Thank you!
Does this do what you want barplot(x[,1], ylim=c(1,3), offset=1) Berend