[prev in list] [next in list] [prev in thread] [next in thread]
List: r-sig-mac
Subject: [R-SIG-Mac]plot hidden grid lines 2
From: Peter Paul Sint <sint () oeaw ! ac ! at>
Date: 2001-07-13 13:43:43
Message-ID: p05010404b774a34d993e () [193 ! 170 ! 84 ! 51]
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic