[R] text overlap in plot

Greg Snow Greg.Snow at imail.org
Fri Jun 24 16:36:50 CEST 2011


Look at the spread.labs function in the TeachingDemos package or the spread.labels function in the plotrix package.

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of David martin
Sent: Friday, June 24, 2011 8:07 AM
To: r-help at stat.math.ethz.ch
Subject: [R] text overlap in plot

Hey,
Here is a snippet that generated a boxplot and separates  points so that 
they do not overlap. I have a problem to avoir text overlapping. Any 
help would be helpful.

 >
attach(InsectSprays)
boxplot(count ~ spray, data = InsectSprays, outpch = NA)
stripchart(count ~ spray, data = InsectSprays,
            vertical = TRUE, method = "jitter",
            pch = 21, col = "maroon", bg = "bisque",
            add = TRUE)

text(count ~ spray , row.names(InsectSprays), pos=4,cex=0.6)
detach(InsectSprays)

thanks david

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list