Skip to content
Back to formatted view

Raw Message

Message-ID: <624B15A2-417D-40F1-A4FD-CF1FE24E4727@comcast.net>
Date: 2011-01-05T14:46:10Z
From: David Winsemius
Subject: dotchart for matrix data
In-Reply-To: <AANLkTimyQnDZagGcKCS1Ves+qRuQ3Bzob4-4boo9v=OT@mail.gmail.com>

On Jan 5, 2011, at 8:11 AM, e-letter wrote:

> 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?

There is no pch command. It is a graphical parameter. If you are  
looking at the "points" help page then you are not looking at  
documentation that necessarily applies to a lattice function like  
dotplot. After first looking at ?dotplot, then ?panel.dotplot,  and  
then because it says the points are done with panel.xyplot, my guess  
is that you need to add a fill =TRUE or a fill= <color-vector> option.

-- 

David Winsemius, MD
West Hartford, CT