[R] lattice color problem with symbols: bug?
John Kane
jrkrideau at yahoo.ca
Fri Jan 11 23:03:01 CET 2008
When I tryyyour code I am getting unfilled symbols, no
colour.
--- Stefan Grosse <singularitaet at gmx.net> wrote:
> Dear useR's,
>
> I have a problem with the lattice plotting of some
> symbols:
>
> library(lattice)
>
>
test<-data.frame(x=c(2,3,1,5),u=c(rep(1,2),rep(2,2)),g=c(rep(c(1,2),2)))
>
> xyplot(x~u,groups=g,
> data=test,
> par.settings=list(
> superpose.symbol=list(pch=c(22,
> 23),cex=c(1.7,1.6),col="black")
> ),
> key=list(
> text=list(c("t1","t2")),
> space = "bottom",pch=c(23, 22),
> points=F,
> cex=1.0,
> col="black"
> ),
> )
>
> As you see the symbols which have been plotted into
> the plotting area appear
> to have some filling color while in the legend there
> is no filling color
> although the specification of the symbols is the
> same.
>
> If I use a normal plot command, the symbols are also
> not filled:
> plot(c(1,2,3),c(1,2,3),pch=c(22,23,24),cex=1.5)
>
> That problem must have occured during a recent
> lattice update since the color
> was not there when I was plotting a year ago with
> R2.5.x and some older
> lattice. It occurs on my linux as well as on my
> windows machine both with R
> 2.6.1 and latest lattice from CRAN.
>
> So here my questions: How do I get rid of the color?
> (or is it a bug?) If it
> is a feature, so how do I determine the color in
> both the symbols in the
> legend and in the plot itself? (Actually I was
> overlaying two plots e.g. one
> colored diamond and one empty diamond to achieve
> that effect but if there is
> a more efficient way to draw bordered symbols with
> customized color that
> would be preferable...)
>
> Stefan
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained,
> reproducible code.
>
More information about the R-help
mailing list