Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lack of color in some plots #56

Closed
orichters opened this issue Feb 15, 2023 · 3 comments · Fixed by #57
Closed

lack of color in some plots #56

orichters opened this issue Feb 15, 2023 · 3 comments · Fixed by #57

Comments

@orichters
Copy link
Contributor

Dear colleagues, I have a strange bug. Using piamInterfaces::plotIntercomparison which calls mip::showLinePlots, I get the following document, which has nice and colorful plots, except for the Nationally Determined Contributions (NDCs) scenario. Anyone an idea, why?

image

@orichters
Copy link
Contributor Author

The problem seems to be related to the () in the scenario title. No idea what is going on, though.

@orichters
Copy link
Contributor Author

The reason:
color_set <- plotstyle(sources) in mipLineHistorical(), but plotstyle() says: "Units in brackets "(US$2005/GJ)" will be ignored", which it seems to do in this line.

Consequence:

> sources
[1] "GCAM 5.3+ NGFS.Nationally Determined Contributions (NDCs)"             
[2] "MESSAGEix-GLOBIOM 1.1-M-R12.Nationally Determined Contributions (NDCs)"
[3] "REMIND-MAgPIE 3.0-4.4.Nationally Determined Contributions (NDCs)"      
> plotstyle(sources)
             GCAM 5.3+ NGFS.Nationally Determined Contributions 
                                                      "#e6194B" 
MESSAGEix-GLOBIOM 1.1-M-R12.Nationally Determined Contributions 
                                                      "#3cb44b" 
      REMIND-MAgPIE 3.0-4.4.Nationally Determined Contributions 
                                                      "#4363d8"

and this line in mipLineHistorical is unable to match colors to models, and makes everything grey.

So: it is a bug. I have no idea how to proceed, given all these dependencies of these functions.

I think a safe solution without many possible side-effects would be to replace this line by something that also strips away all the ( stuff. Or use unitsplit everywhere.

Solutions warmly welcome @tscheypidi @dklein-pik

@orichters
Copy link
Contributor Author

Ah, I see. Basically the same problem as in #54

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 a pull request may close this issue.

1 participant