[R] Dotchart showing mean and median by group

Gabor Grothendieck ggrothendieck at gmail.com
Thu May 10 01:10:35 CEST 2012


On Wed, May 9, 2012 at 5:32 PM, Tal Galili <tal.galili at gmail.com> wrote:
> Hello dear Gabor,
>
> First - thank you for this solution!
>
> Second - I see that the text that is added around the axes is a tiny bit
> shifted - causing a slight blur of the text.  Does it happen only on
> Windows?  Can it be fixed?
>

On my Windows system it looks ok to me but if you want to eliminate
the overwriting this will suppress the mtext and axis annotations on
the first dotchart call.

library(proto)
p <- proto(dotchart = dotchart, mtext = list, axis = list)
with(p, dotchart(VADeaths, gdata = mean.values))
par(new = TRUE)
dotchart(VADeaths, gdata = median.values, pch = 20)

-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



More information about the R-help mailing list