Scope and limitations of extra.ggplot2
Open
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 32
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
@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:
- What is the scope of this argument?
- 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the charts functions and the extra.ggplot2 argument shown in the tm_chart_histogram examples. Trace how supplied ggplot2 options are applied, then document the argument's scope, supported options, and the limitation demonstrated by theme_dark().
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data-visualization, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100