Tmap: Geom_text_repel equivalent in tmap

Created on 8 Aug 2019  路  2Comments  路  Source: mtennekes/tmap

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](https://github.com/mtennekes/tmap/files/3481200/BF_LLIN_8_5_19.pdf)

enhancement

Most helpful comment

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.

All 2 comments

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.

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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mtennekes picture mtennekes  路  4Comments

Nowosad picture Nowosad  路  5Comments

Nowosad picture Nowosad  路  4Comments

jannes-m picture jannes-m  路  5Comments

MatthieuStigler picture MatthieuStigler  路  3Comments