[R] Avoid overlap of labels in a scatterplot

Jim Lemon jim at bitwrit.com.au
Sun Oct 12 11:42:22 CEST 2008


Nicola Sturaro Sommacal wrote:
> Dear R users,
> I realise a scatterplot by
> plot(x,y)
> and I add the labels by
> text(x,y,labels,pos=1).
>
> How can I avoid, automatically, that labels overlap, like happen in SPSS?
Hi Nicola,
thigmophobe.labels in the plotrix package tries to avoid label crashes, 
and you can (see the help page) modify the position of a few labels if 
it doesn't quite succeed.

Jim



More information about the R-help mailing list