[R] funtion equivalent of jitter to move figures on device

Peter Ehlers ehlers at ucalgary.ca
Tue Mar 12 20:26:34 CET 2013


On 2013-03-12 08:04, Folkes, Michael wrote:
> hello all,
> I'm overlaying numerous scatter plots onto a map (done in PBSmodelling). In this case I'm placing each plot by setting par(fig) to the centroid of map polygons. The location/mapping part is not so important. There are cases of small overlaps for some plots (ie figures) so I'm keen to write or find a function that moves my small scatter plots so they don't overlap. A little like jitter, but not random in behaviour, it needs to move away from the plots it's overlapping.
>
> thanks to all
> Michael
> _______________________________________________________
> Michael Folkes
> Salmon Stock Assessment
> Canadian Dept. of Fisheries & Oceans
> Pacific Biological Station
>

I would investigate the subplot() function in Greg Snow's
TeachingDemos package, possibly in conjunction with his
updateusr() function.

For interactive placement of figures, it should be possible to
use locator() to place each plot.

Peter Ehlers



More information about the R-help mailing list