On 05/09/2012 07:12 PM, Marion Wenty wrote:> Dear R-helpers,
>
> I would like to draw white lines in my barplots to improve the
> visualization.
>
> I include an example:
>
>
barplot(sample(1:100,15),width=0.59,horiz=T,col="steelblue",border="NA",axes=F,ylim=c(0,10),xlim=c(0,100))
> abline(v = seq(10, zehnind, by = 10), col = "white")
> axis(1,at=ticks,las=1,labels=paste(ticks,"%",sep=""))
>
> my problem is, that the white lines are not long enough at the top.
>
> I also tried the function lines and asix, which didn't work either,
neither
> did changing the ylim.
>
Hi Marion,
Try this:
...
par(xpd=TRUE)
abline(v = seq(10, zehnind, by = 10), col = "white")
par(xpd=FALSE)
...
Jim