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

tmap_arrange -> patchwork-ish functionality #1046

@Xiezhibin

Description

@Xiezhibin

Dear tmap developers,

I have a question regarding the tmap_arrange() function and its ability to handle complex, multi-layered layouts. Specifically, I'm trying to recreate a layout similar to the image below:

img

https://www.thebrighterside.news/post/global-life-expectancy-forecast-to-rise-nearly-5-years-by-2050/

This layout features:

  • A large world map occupying the majority of the space.
  • A set of smaller maps arranged in two rows at the bottom.
  • The first row contains 5 small maps of equal width.
  • The second row contains 2 small maps, with the second one being wider than the first.

Image

https://www.thelancet.com/journals/lanplh/article/PIIS2542-5196%2818%2930170-0/fulltext

This layout features:

  • Two main world maps at the top, side by side, representing different datasets: "Energy availability" (A) and "Carbohydrate availability" (B).
  • A series of smaller maps at the bottom, arranged in two rows, showcasing detailed views of specific regions.
  • The first row contains 5 small maps of equal width.
  • The second row contains 2 small maps, with the second one being wider than the first.
  • Each main map and small map has its own legend and title, clearly indicating the dataset it represents.

I've been attempting to use nested tmap_arrange() calls to achieve this, but I'm encountering difficulties. I'm wondering:

  1. Does tmap_arrange() support circular or multi-layered nesting to create such complex layouts?
  2. What is the recommended approach to recreate the layout in the image using tmap?

I've tried various combinations of tmap_arrange() with different nrow, widths, and heights parameters, but I haven't been able to achieve the desired result.

Any guidance or suggestions would be greatly appreciated.

Thank you for your time and assistance.

Best regards, Dainel Tse

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions