[R] lattice: change point color in densityplot()?

Deepayan Sarkar deepayan at stat.wisc.edu
Sat Jun 4 01:23:08 CEST 2005


On Friday 03 June 2005 17:49, M. K. wrote:
> When using the "densityplot" function from "lattice" library, is there
> a way to pick a different color *for the points only*?  (I'm using
> densityplot(..., plot.points=TRUE, ...))  Using "col" parameter changes
> the color for both, the points and the curve.

Indirectly. ?panel.densityplot says that there's a parameter for line color, 
so you could do 

densityplot(rnorm(100), col = 'red', col.line = 'cyan')

Deepayan




More information about the R-help mailing list