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

fix inconsistent legends and ylabels #63

Merged
merged 2 commits into from
Apr 26, 2023
Merged

Conversation

orichters
Copy link
Contributor

  • Using the mip plot functions with piamInterfaces::plotIntercomparison lead to some strange ylabels and plot descriptions in mipArea / mipBarYearData / showAreaAndBarPlots: Confusing ylab in mipArea / mipBarYearData / showAreaAndBarPlots #60
  • The reason was that shorten_legend was called with different settings, and that sometimes the back part was dropped completely
  • I added a third option to shorten_legend where the ylab is provided and the plot variables are shortened by just cutting the ylab part out
  • showAreaAndBarPlots() now derives ylab and passes it to mipArea and mipBarYearData
  • Using the new function identifierModelScen(), harmonize that model names are shown in the legend only if different models exist. If all models or scenarios are the same, paste it after Model output such that it still present, but does not repeat endlessly in the legend (in particular with long scenario names).
  • Harmonize parentheses around units to (unit)
  • shorten_legend and identifierModelScen get extensive tests
  • see below the things that were changed marked in red on the left, corrected on the right

mipchanges

@orichters orichters linked an issue Apr 18, 2023 that may be closed by this pull request
Copy link
Member

@dklein-pik dklein-pik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very useful improvement of shorten_legend. Thanks!

@orichters orichters merged commit 33b5c43 into pik-piam:master Apr 26, 2023
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.

Confusing ylab in mipArea / mipBarYearData / showAreaAndBarPlots
2 participants