[R-SIG-Mac]plot hidden grid lines 2
Peter Paul Sint
sint@oeaw.ac.at
Fri, 13 Jul 2001 15:43:43 +0200
Dear Stefano,
Actually panel.first works somehow but not as I expected
jjbp<- barplot(1:5, panel.first=lines(c(0,5),c(1,2),lty="dashed"))
> jjbp # position of bar mids
[,1]
[1,] 0.7
[2,] 1.9
[3,] 3.1
[4,] 4.3
[5,] 5.5
>
starts a line at c(0,5) but goes upward
(I understand it should advance from (0,1) to (5,2)
but it also does not work for (0,5)-(1,2) )
somehow the axes/units seem to be mixed up.
After playing around I realize:
axes are probably scaled such that the xlim=ylim=c(0,1)
with this
jjbp<- barplot(1:5, panel.first=abline(h=2/5,lty="dashed"))
works.
Is this what is intended? does R work this way on other platforms?
I assumed the axes of the barplot should be used.
abline uses the yaxis as main abscissa
jjbp<- barplot(seq(0,1,0.2), panel.first=abline(0.5,-1))
Peter
--
Peter Sint
sint@oeaw.ac.at