[R] lattice and legend

robert-mcfadden at o2.pl robert-mcfadden at o2.pl
Mon Jan 18 14:26:47 CET 2010


I use lattice package to produce a bar chart. I set my.kolor for bars and it displays properly but I have a problem with legend color. It behaves as if I didn't set my.colors - the colors differs. How to work it out?     

barchart(Counts ~ Purchase | Products , data = my.data, groups = Model,
col=my.kolor,horizontal=FALSE,layout=c(1,4),
auto.key=list(rectangles = TRUE, space = "bottom"),scales = list(y = "free"))

Best,
Robert



More information about the R-help mailing list