Re: [R] Avoiding overplotting of text.

From: Gustaf Rydevik <gustaf.rydevik_at_gmail.com>
Date: Tue, 26 Feb 2008 12:57:42 +0100

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

______________________________________________
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.
Received on Tue 26 Feb 2008 - 12:01:33 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 26 Feb 2008 - 12:30:16 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive