Skip to content

Added showLinePlotsWithZones.R to overlay cs2 scenario plots with background zones - #144

Merged
robertsalzwedel merged 3 commits into
pik-piam:masterfrom
robertsalzwedel:master
Jan 23, 2026
Merged

Added showLinePlotsWithZones.R to overlay cs2 scenario plots with background zones#144
robertsalzwedel merged 3 commits into
pik-piam:masterfrom
robertsalzwedel:master

Conversation

@robertsalzwedel

Copy link
Copy Markdown
Contributor

This PR introduces a new function, showLinePlotsWithZones(), which builds on the existing showLinePlots() workflow by allowing background zones to be added to the line plots.

The function reuses createLinePlots() and layoutLinePlots() so that the current plotting logic and layout remain unchanged, but adds optional background bands (e.g. green, yellow, red) and threshold lines. These zones can be applied either to the main region plot, the regional plots, or to both.

This is particularly useful for visualising time series relative to reference thresholds — for example planetary boundary indicators — where background zones help to provide context and make it easier to interpret the magnitude and direction of changes over time.

Comment thread R/showLinePlotsWithZones.R Outdated
@fbenke-pik

fbenke-pik commented Jan 22, 2026

Copy link
Copy Markdown
Contributor

Don't forget to run buildLibrary().

@robertsalzwedel
robertsalzwedel merged commit 5f7141b into pik-piam:master Jan 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants