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

tm_graticules with labels around the 4 sides of the map frame #1094

@aonojeghuo

Description

@aonojeghuo

Hi everyone. I recently had a request for a map with graticules labeled fully around the map as opposed to the default:
labels.pos : position of the labels. Vector of two: the horizontal ("left" or "right") and the vertical ("top" or "bottom") position.
These are two examples:

  tm_shape(NLD_muni) +
  tm_polygons("pop_65plus") +
  tm_graticules(labels.pos = c("right", "top"))

Image

The default only takes a vector of two so I attempted 4 to see if anything changes but it only took the first two.

  tm_shape(NLD_muni) +
  tm_polygons("pop_65plus") +
  tm_graticules(labels.pos = c("right", "top","left","right"))

Image

Is there a way to have the four sides labeled?
Also the map looks better with left and bottom labels. With the right and top, the right labels are not mirrored but overlap the map frame itself. Is there a fix for this?
Here's the left bottom example:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    LayoutIssues related to map layout (including many maps, facets, positions, etc.)Plot-modeStatic mode issues

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions