# [R] size of point symbols

baptiste auguie ba208 at exeter.ac.uk
Thu May 21 20:48:01 CEST 2009

```Dear list,

This might be a topic for r-devel but i may be missing something
obvious.

I don't understand the rationale in the absolute sizes of the point
symbols, and I couldn't find it documented. The example below uses
Grid to check the size of the symbols against a square of 10mm x 10mm.

> checkOneSymbol <- function(pch=0){
>     gTree(children=gList(
>         rectGrob(0.5, 0.5, width=unit(10, "mm"), height=unit(10,
> "mm"),
>                 gp=gpar(lty=2, fill=NA, col=alpha("black", 0.5))),
>     pointsGrob(0.5, 0.5, size=unit(10, "mm"),pch=pch,
>         gp=gpar(col=alpha("red", 0.5)))
>     ))
>
> }
> all.symbols <- lapply(0:23, checkOneSymbol)
>
> pdf("symbols.pdf", height=1.2/2.54, width=24.2/2.54)
>
> vp <- viewport(width=0.5, height=0.5, name="main")
> pushViewport(vp)
>
> pushViewport(viewport(layout=grid.layout(1, 24,
>                         widths=unit(10, "mm"),
>                         heights=unit(10, "mm"),
>                         just="center")))
>
> for(ii in 0:23){
> pushViewport(viewport(layout.pos.col=ii+1, layout.pos.row=1))
> grid.draw(all.symbols[[ii+1]])
> upViewport(1)
> }
> dev.off()

What dictates the size of each symbol? (in other words, why is pch=21
a circle of radius given in inches, while pch=0 is a cross of arms'
length specified  in mm?)

Best regards,

baptiste

_____________________________

Baptiste Auguié

School of Physics
University of Exeter