这是indexloc提供的服务,不要输入任何密码
Skip to content

Text and inset overlaps when a capital letter "CENTER" position is used #1169

@Nowosad

Description

@Nowosad
library(tmap)
library(tmaptools)

# works fine
tm_shape(NLD_dist) +
  tm_polygons(
    fill = "edu_appl_sci",
    col = NULL) +
  tm_shape(NLD_muni) +
  tm_borders() +
  tm_title("Amsterdam", size = 0.8, position = c("left", "center")) +
  tm_inset(bb("Amsterdam"), position = c("left", "center")) 

# overlaps
tm_shape(NLD_dist) +
  tm_polygons(
    fill = "edu_appl_sci",
    col = NULL) +
  tm_shape(NLD_muni) +
  tm_borders() +
  tm_inset(bb("Amsterdam"), position = c("LEFT", "CENTER")) +
  tm_title("Amsterdam", size = 0.8, position = c("LEFT", "CENTER")) 

Created on 2025-07-18 with reprex v2.1.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    LayoutIssues related to map layout (including many maps, facets, positions, etc.)

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions