point area and overlap

7 views
Skip to first unread message

Eduardo Leoni

unread,
Jul 20, 2009, 4:53:33 AM7/20/09
to ggplot2
Dear list:

I am writing a function that given (x, y) locations of points and
point size, minimizes the overlap among the points. (Something similar
to what maptools::pointLabel accomplishes for labels). I have a couple
of questions. 1) Does anyone know any function that does this? 2) How
do I get the point size in mm or in relation to the plot area from a
ggplot2 plot?

Thanks for any help,

-eduardo

hadley wickham

unread,
Jul 20, 2009, 7:37:21 AM7/20/09
to Eduardo Leoni, ggplot2
> I am writing a function that given (x, y) locations of points and
> point size, minimizes the overlap among the points. (Something similar
> to what maptools::pointLabel accomplishes for labels). I have a couple
> of questions. 1) Does anyone know any function that does this?

I'm not aware of anything. If you want to do this well, you'll need
to think about exactly what criteria you want to optimise, balancing
fidelity to the original data with the amount of desired
simplification.

> 2) How
> do I get the point size in mm or in relation to the plot area from a
> ggplot2 plot?

Unfortunately this is basically impossible, due to some of the
limitations of the grid and the way that ggplot2 plots are rendered.

Hadley

--
http://had.co.nz/

Reply all
Reply to author
Forward
0 new messages