[R] Avoiding overplotting of text.
Gustaf Rydevik
gustaf.rydevik at gmail.com
Tue Feb 26 12:57:42 CET 2008
On Mon, Feb 25, 2008 at 10:36 PM, hadley wickham <h.wickham at gmail.com> wrote:
> > I am plotting some data, and use text() to get variable names next to
> > points on the graph. What is the best way to make sure that these text
> > labels are readable and not overlapping when two datapoints are close?
> > I've tried using jitter(), but the effect is random and doesn't always
> > give a good result.
> > Any suggestions would be most appreciated.
>
> Have a look at pointLabel in maptools -
> http://finzi.psych.upenn.edu/R/library/maptools/html/pointLabel.html
>
>
> --
> http://had.co.nz/
>
Thank you, Hadley. That was a very good tool to find!
In conjunction to the regular tricks mentioned by Rickard Cotton, and
thigmophobe by Jim Lemon, the problem turned out to be fairly easy.
This seem like one of those tasks that is needed fairly frequently,
but which is rarely bothered with. Would it be possible to add one of
these algorithms as an option to the regular text()?
Regards,
Gustaf
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_rydevik
More information about the R-help
mailing list