[R] Filling graphic objects
p.b.pynsent at bham.ac.uk
Wed Mar 12 16:25:40 CET 2003
On Wednesday, March 12, 2003, at 12:13 pm, ripley at stats.ox.ac.uk wrote:
> On Wed, 12 Mar 2003, p.b.pynsent wrote:
>> I have used polygon() to mark the confidence limits of a survival
>> In another project, I have used the col parameter to fill my boxplots.
>> The poly() description refers to filling but actually produces
> Did you mean polygon()?
Yes, I apologise
>> hatching (i.e. lines ).
>> boxplot() does truly fill the boxes with a colour or shades of grey
>> (e.g. col="red").
>> My novices perception of R graphics is:
>> If you can hatch it, you cannot fill it.
>> If you can fill it you cannot hatch it.
>> Is this correct or is there a way of hatching my boxplots and filling
>> my polygons?
> You can fill polygons or rectangles (rect()) by giving `col' and not
> giving `density'.
Thank you, this is not evident from the documentation. My confidence
limits now look much better.
> You cannot AFAICS hatch boxplots using the existing code: they are
> conventionally not filled or filled in light grey.
The problem is distinguishing more than one group on a single boxplot,
shades of grey are not suitable for standard figures in publications.
Anyway thank you again.
Dr. P. B. Pynsent,
Research and Teaching Centre,
Royal Orthopaedic Hospital,
Birmingham, B31 2AP, U.K.
More information about the R-help