[R] dotchart for matrix data

e-letter inpost at gmail.com
Wed Jan 5 14:11:52 CET 2011


Readers,

The following commands were applied, to create a dot chart with black
dots and blue squares for data:

> library(lattice)
> testdot
  category values
1        b     44
2        c     51
3        d     65
4        a     10
5        b     64
6        c     71
7        d     49
8        a     27

dotplot(category~values,col=c("black","black","black","black","blue","blue","blue","blue"),bg=c("black","black","black","black","blue","blue","blue","blue"),pch=c(21,21,21,21,22,22,22,22),xlab=NULL,
data=testdot)

The resultant graph shows correctly coloured points, but not filled,
only the border is coloured. The documentation for the command 'pch'
(?pch) indicates that the commands shown above should show
appropriately coloured solid symbols. What is causing this error
please?



More information about the R-help mailing list