tmap icon indicating copy to clipboard operation
tmap copied to clipboard

Geom_text_repel equivalent in tmap

Open ifeomaozo opened this issue 4 years ago • 2 comments

Is there a geom_text_repel equivalent in tmap? I just created the attached map in R with labels resized by the area of the polygons but the names of two polygons are missing because their areas are too small. I would like to create a line segment from the two polygons that points to their names outside the map. Something similar to what was described in this link for ggplot >>> https://github.com/slowkow/ggrepel/issues/89

Does tmap have the functionality to accomplish that? I will appreciate your response.[ BF_LLIN_8_5_19.pdf ](url)

ifeomaozo avatar Aug 08 '19 10:08 ifeomaozo

Thanks for your question.

Not yet, but it would be a nice feature to have. tm_text already has a xmod and ymod argument, which could be used to nudge the text labels. Maybe we need another argument like connection.line which draws a line between the original location of the label and the actual location.

mtennekes avatar Aug 11 '19 15:08 mtennekes

I would love this. I have started a new R project to try to hack out a solution but would be delighted if somebody more skilled beat me to it!

francisbarton avatar Apr 09 '20 15:04 francisbarton