pik-piam / mip

Model intercomparison visualization package
Other
1 stars 24 forks source link

Include different options for region color palette #51

Open johannah-pik opened 1 year ago

johannah-pik commented 1 year ago

Depending on the use case, different color palettes are desired for the REMIND regions. The new region colors from this PR are optimized for distinguishability (e.g. for the REMIND validation). For publications, grouped colors for like-wise regions could be better.

Here is a proposal from Nico for a grouped color palette, that could be implemented as an alternative choice:

OECD regions plotstyle.add("EUR", "EU", rgb(0.0, 0.0, 0.99, 1), marker = 23, replace = TRUE ) plotstyle.add("NEU", "Other Europe", rgb(0.0, 0.0, 0.65, 1), marker = 9, replace = TRUE ) plotstyle.add("USA", "USA", rgb(0.5, 0.5, 0.99, 1), marker = 10, replace = TRUE ) plotstyle.add("JPN", "Japan", rgb(0.0, 0.5, 0.99, 1), marker = 13, replace = TRUE ) plotstyle.add("CAZ", "Can, Aus, NZ", rgb(0.3, 0.3, 0.8, 1), marker = 17, replace = TRUE )

Regions with developing and Emerging markets plotstyle.add("CHA", "China", rgb(0.3, 0.99, 0.3, 1), marker = 19, replace = TRUE ) plotstyle.add("IND", "India", rgb(0.3, 0.65, 0.3, 1), marker = 8, replace = TRUE ) plotstyle.add("OAS", "Other Asia", rgb(0.6, 0.99, 0.0, 1), marker = 11, replace = TRUE ) plotstyle.add("SSA", "Sub-Sahra Africa", rgb(0.5, 0.0, 0.99, 1), marker = 15, replace = TRUE ) plotstyle.add("MEA", "Middle East & N. Africa", rgb(0.7, 0.2, 0.99, 1), marker = 17, replace = TRUE ) plotstyle.add("LAM", "Latin America", rgb(0.9, 0.6, 0.5, 1), marker = 12, replace = TRUE

0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q commented 1 year ago

State as of 0.140.1: image

This proposal: image

nicobauer commented 1 year ago

Thanks! Maybe it is useful also to somehow group the markers. Proposal (with reference at the end): OECD/high income regions: 15-19 China, India, OAS: 2,1,6 LAM, REF: 12, 13 MEA, SSA: 3,4 https://github.com/pik-piam/mip/issues/51

robertpietzcker commented 1 year ago

This merge request:

sorry, maybe I am a bit slow - what do you mean with "this merge" - Nico's proposal? The option to choose a different palette (such as Nico's proposal) still has to be implemented sometime in the future, right?

0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q commented 1 year ago

Clarified. This is indeed a proposal, not a merge request.

0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q commented 1 year ago

The option to choose a different palette (such as Nico's proposal) still has to be implemented sometime in the future, right?

Very much so, as plotstyle.add() is a destructive operation.

nicobauer commented 1 year ago

Somehow I remember that @dklein-pik was the master of plotstyle and the default csv file that is used. David, if so, could you up-date?

nicobauer commented 1 year ago

@0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q I only use plotstyle.add locally, where it does not affect the overall default values.

0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q commented 1 year ago

@0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q I only use plotstyle.add locally, where it does not affect the overall default values.

Yes. But you can't go back to default values. So there is no option for you to use either one or the other, except for manually setting them every time. Which defeats the purpose of the plot styles to some degree.

dklein-pik commented 1 year ago

Somehow I remember that @dklein-pik was the master of plotstyle and the default csv file that is used. David, if so, could you up-date?

I am not sure what you want. But if you want to update colors you can do it here https://github.com/pik-piam/mip/blob/master/inst/extdata/plotstyle.csv