[R] Vertical line in densityplot?

Gustaf Rydevik gustaf.rydevik at gmail.com
Fri Dec 1 09:06:15 CET 2006


On 12/1/06, Thomas Petzoldt <petzoldt at rcs.urz.tu-dresden.de> wrote:
> Hi,
>
> lattice graphics work by utilizing so called panel functions. Here is a
> working version of your example:
>
> library(lattice)
> x<-rnorm(100)
> plot.new()
> densityplot(x,
>   panel=function(x, ...){
>     panel.densityplot(x, ...)
>     panel.abline(v=0)
>   }
> )
>
>
> For mor information, please look into the examples of densityplot and
> the help file of panel.abline
>
>
> Hope it helps
>
> Thomas
>

Thank you very much! Lattice works somewhat different from "regular"
graphics step-by-step addition then.

With standard axis, I just meant a set of axis where the x and y axis
are represented by lines going through origo, or (0,0). Right now some
sort of box is used instead.

Thanks again!

/Gustaf

-- 
email:gustaf.rydevik at gmail.com
tel: +46(0)703051451
address: Kantorsgatan 50:190 75424 Uppsala Sweden




More information about the R-help mailing list