Skip to content

Scope and limitations of extra.ggplot2 #10

@Nowosad

Description

@Nowosad

@mtennekes -- would you be able to let me know what is the scope and limitations of the extra.ggplot2 argument in the charts functions? For example, I've tried to use the dark theme, and the whole chart is not longer readable. Thus:

  1. What is the scope of this argument?
  2. Is it possible to specify a few ggplot2 options with it?
library(tmap)
library(spData)

tm_shape(nz) +
  tm_polygons("Median_income",
              fill.chart = tm_chart_histogram())

tm_shape(nz) +
  tm_polygons("Median_income",
              fill.chart = tm_chart_histogram(
                extra.ggplot2 = ggplot2::theme_dark()
              ))

Created on 2025-06-24 with reprex v2.1.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions