Skip to content

Commit

Permalink
IPCC color update (#314)
Browse files Browse the repository at this point in the history
* updated ipcc colors

* add some docs

* stickler

* update expected fig

* update release notes

* move update to individual updates

* add link to websites in notebook
  • Loading branch information
gidden authored and danielhuppmann committed Dec 30, 2019
1 parent 510851d commit ba32927
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 15 deletions.
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ region-level. To keep the previous behaviour, add `components=True`.

## Individual Updates

- [#314](https://github.com/IAMconsortium/pyam/pull/314) Update IPCC color scheme colors and add SSP-only colors
- [#313](https://github.com/IAMconsortium/pyam/pull/313) Add feature to `downscale` timeseries data to subregions using another variable as proxy
- [#312](https://github.com/IAMconsortium/pyam/pull/312) Allow passing list of variables to `aggregate` functions
- [#305](https://github.com/IAMconsortium/pyam/pull/305) Add `method` and `weight` options to the (region) aggregation functions
Expand Down
4 changes: 2 additions & 2 deletions doc/source/tutorials/ipcc_colors.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"source": [
"# Using IPCC Color Palettes\n",
"\n",
"**pyam** supports the use of explicit IPCC AR5 and AR6 color palettes by providing the RCP and/or SSP of interest via the `pyam.run_control()` feature."
"**pyam** supports the use of explicit IPCC [AR5](https://tdaviesbarnard.co.uk/1202/ipcc-official-colors-rcp/) and [AR6](https://github.com/IPCC-WG1/colormaps) color palettes by providing the RCP and/or SSP of interest via the `pyam.run_control()` feature."
]
},
{
Expand Down Expand Up @@ -135,7 +135,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.4"
"version": "3.7.3"
}
},
"nbformat": 4,
Expand Down
37 changes: 24 additions & 13 deletions pyam/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,30 @@
}

PYAM_COLORS = {
'AR6-SSP1-1.9': "#00AAD0",
'AR6-SSP1-2.6': "#003466",
'AR6-SSP2-4.5': "#EF550F",
'AR6-SSP3-7.0': "#E00000",
'AR6-SSP3-LowNTCF': "#E00000",
'AR6-SSP4-3.4': "#FFA900",
'AR6-SSP4-6.0': "#C47900",
'AR6-SSP5-3.4-OS': "#7F006E",
'AR6-SSP5-8.5': "#990002",
'AR6-RCP-2.6': "#003466",
'AR6-RCP-4.5': "#5492CD",
'AR6-RCP-6.0': "#C47900",
'AR6-RCP-8.5': "#990002",
# AR6 colours from https://github.com/IPCC-WG1/colormaps
# where each file is processed to generate hex values, e.g.:
# for liwith open('rcp_cat.txt') as f:
# for l in f.readlines():
# rgb = np.array([int(x) for x in l.strip().split()]) / 256
# print(matplotlib.colors.rgb2hex(rgb))
'AR6-SSP1': "#1e9583",
'AR6-SSP2': "#4576be",
'AR6-SSP3': "#f11111",
'AR6-SSP4': "#e78731",
'AR6-SSP5': "#8036a7",
'AR6-SSP1-1.9': "#1e9583",
'AR6-SSP1-2.6': "#1d3354",
'AR6-SSP2-4.5': "#e9dc3d",
'AR6-SSP3-7.0': "#f11111",
'AR6-SSP3-LowNTCF': "#f11111",
'AR6-SSP4-3.4': "#63bce4",
'AR6-SSP4-6.0': "#e78731",
'AR6-SSP5-3.4-OS': "#996dc8",
'AR6-SSP5-8.5': "#830b22",
'AR6-RCP-2.6': "#980002",
'AR6-RCP-4.5': "#c37900",
'AR6-RCP-6.0': "#709fcc",
'AR6-RCP-8.5': "#003466",
# AR5 colours from
# https://tdaviesbarnard.co.uk/1202/ipcc-official-colors-rcp/
'AR5-RCP-2.6': "#0000FF",
Expand Down
Binary file modified tests/expected_figs/test_line_PYAM_COLORS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ba32927

Please sign in to comment.