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

Support for Hatched/Patterned Polygons #1135

@Bevann

Description

@Bevann

It would be highly valuable for the tmap package to support hatched (patterned) fills for polygon layers, similar to classic GIS hatching and the functionality available in packages like ggpattern for ggplot2. This feature should also include consistent legend rendering for patterns.

  • Other R mapping packages (notably ggpattern for ggplot2) and GIS software (QGIS, ArcGIS) offer pattern fills, but tmap currently does not.
  • Many users rely on tmap for publication-quality static maps and would benefit from this functionality.
  • Add arguments to tm_polygons() (or similar) to specify fill pattern type (stripe, crosshatch, dot, etc.), angle, spacing/size, foreground and background color.
  • Allow patterns to be mapped to variables, similar to how color or linetype can be mapped.
  • Ensure patterns render correctly in both R graphics devices and exported files (png, pdf, svg).
  • Legend support: The map legend should show pattern swatches, with clear, scalable representation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    LayersIssues related to map layers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions