Dear R users I'm looking for algorithms that assist in spreading out crowded labels, e.g. labels of points in a scatter plot, in order to obtain a nicer visual appearance and better legibility. I'm probably just stuck because I didn't find the right key words for a successful search on the R websites or in the mailing list archives. Any hints are appreciated. Thomas Zumbrunn University of Basel
arrangement of crowded labels
6 messages · Richard Cotton, Thomas Zumbrunn, Greg Snow +1 more
I'm looking for algorithms that assist in spreading out crowded labels,
e.g.
labels of points in a scatter plot, in order to obtain a nicer visual appearance and better legibility. I'm probably just stuck because I didn't find the right key words for a successful search on the R websites or in the mailing list archives.
Try thigmophobe.labels in the plotrix package.
Regards,
Richie.
Mathematical Sciences Unit
HSL
------------------------------------------------------------------------
ATTENTION:
This message contains privileged and confidential inform...{{dropped:20}}
Look at the spread.labs and the dynIdentify and TkIdentify functions in the TeachingDemos package.
Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111 > -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of Thomas Zumbrunn > Sent: Wednesday, May 20, 2009 12:18 AM > To: r-help at r-project.org > Subject: [R] arrangement of crowded labels > > Dear R users > > I'm looking for algorithms that assist in spreading out crowded labels, > e.g. > labels of points in a scatter plot, in order to obtain a nicer visual > appearance and better legibility. > > I'm probably just stuck because I didn't find the right key words for a > successful search on the R websites or in the mailing list archives. > > Any hints are appreciated. > > Thomas Zumbrunn > University of Basel > > ______________________________________________ > 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.
-----Original Message----- I'm looking for algorithms that assist in spreading out crowded labels, e.g. labels of points in a scatter plot, in order to obtain a nicer visual appearance and better legibility. I'm probably just stuck because I didn't find the right key words for a successful search on the R websites or in the mailing list archives.
On Wednesday 20 May 2009, Richard.Cotton at hsl.gov.uk wrote:
Try thigmophobe.labels in the plotrix package.
On Wednesday 20 May 2009, Greg Snow wrote:
Look at the spread.labs and the dynIdentify and TkIdentify functions in the TeachingDemos package.
Thanks for your answers. This was almost what I was looking for, except that I would need something for a 2-dimensional context (my question was not specific enough). Best wishes /thomas
The dynIdentify and TkIdentify functions work in 2 dimensions (and I think the thigmophope.labels does as well). The algorithm in spread.labs could be adapted to 2 dimensions (the example shows a semi-2 dimensional approach) if you can define what you want to happen (can labels overplot the points?, how far from the points can they move?, etc.), other than toy examples, I think the interactive approach in (dyn/Tk)Identify is probably better than trying to work out all the rules to give to a fully automated function (unless you need something fully automatic). Hope this helps,
Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111 > -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of Thomas Zumbrunn > Sent: Thursday, May 21, 2009 11:24 AM > To: r-help at r-project.org > Subject: Re: [R] arrangement of crowded labels > > > -----Original Message----- > > I'm looking for algorithms that assist in spreading out crowded > labels, e.g. > > labels of points in a scatter plot, in order to obtain a nicer visual > > appearance and better legibility. > > > > I'm probably just stuck because I didn't find the right key words for > a > > successful search on the R websites or in the mailing list archives. > > On Wednesday 20 May 2009, Richard.Cotton at hsl.gov.uk wrote: > > Try thigmophobe.labels in the plotrix package. > > On Wednesday 20 May 2009, Greg Snow wrote: > > Look at the spread.labs and the dynIdentify and TkIdentify functions > in the > > TeachingDemos package. > > Thanks for your answers. This was almost what I was looking for, except > that I > would need something for a 2-dimensional context (my question was not > specific > enough). > > Best wishes > /thomas > > ______________________________________________ > 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.
Thomas Zumbrunn wrote:
... Thanks for your answers. This was almost what I was looking for, except that I would need something for a 2-dimensional context (my question was not specific enough).
Hi Thomas, The thigmophobe.labels function just works out how to place each label away from the nearest point to the point that is being labeled. The pointLabel function in the maptools package and the spread.labs function in Teaching Demos use more sophisticated algorithms to do this, and may work in situations where thigmophobe.labels wouldn't separate all the labels. Jim