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

Erasing raster data outside of the earth_boundary #1170

@Nowosad

Description

@Nowosad

Currently, the space.color is in the background of the data -- I would guess (if possible) it should in the forefront.

library(tmap)

tm_shape(land["elevation"]) +
  tm_raster(
    col.scale = tm_scale_continuous(values = "geyser", midpoint = NA)
  ) +
  tm_crs("+proj=eqearth") +
  tm_layout(earth_boundary = TRUE,
            space.color = "red")

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