From aa0702460db83d31f9ccb4e2fc2641e7e0c17d4e Mon Sep 17 00:00:00 2001 From: Falk Benke Date: Wed, 28 Feb 2024 17:23:32 +0100 Subject: [PATCH 1/2] fix warning in mipLineHistorical --- R/mipLineHistorical.R | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/R/mipLineHistorical.R b/R/mipLineHistorical.R index 3369bf0..d3c2abb 100644 --- a/R/mipLineHistorical.R +++ b/R/mipLineHistorical.R @@ -256,8 +256,17 @@ mipLineHistorical <- function(x,x_hist=NULL,color.dim="identifier",linetype.dim= #fill: add colors for historical and keep shape symbol #alpha: add colors for projection depending on leg.proj p <- p + scale_color_manual(color.dim.name,values = color_set, breaks=model_output,labels=model_output,guide=guide_legend(order=1,title.position = "top", ncol=legend.ncol)) - p <- p + scale_fill_manual("Historical data",values = color_set[historical],breaks=historical, - guide=guide_legend(override.aes = list(colour=color_set[historical],shape="+",linetype=0,size=5),order=2,title.position = "top", ncol=legend.ncol)) + + if (!is.null(x_hist)) { + p <- p + scale_fill_manual("Historical data", + values = color_set[historical], breaks = historical, + guide = guide_legend(override.aes = list( + colour = color_set[historical], + shape = "+", linetype = 0, size = 5 + ), order = 2, title.position = "top", ncol = legend.ncol) + ) + } + if(leg.proj) p <- p + scale_alpha_manual("Other projections",values = seq(0.1,1,length.out = length(projection)),breaks=projection,labels=projection,guide=guide_legend(override.aes = list(colour=color_set[projection],shape=NULL,linetype=1,linewidth=1,alpha=0.5),order=3,title.position = "top", ncol=legend.ncol)) else p <- p + scale_alpha_manual("Other projections",values = seq(0.1,1,length.out = length(projection)),breaks=projection,labels=projection,guide=guide_legend(override.aes = list(colour="#A1A194",shape=NULL,linetype=1,linewidth=1,alpha=0.5),order=3,title.position = "top", ncol=legend.ncol)) p <- p + guides(linetype=guide_legend(order=4,title.position="top",ncol=legend.ncol)) From abe51e7b8a16886799c6c2f365d7d1046e9936c0 Mon Sep 17 00:00:00 2001 From: Falk Benke Date: Wed, 28 Feb 2024 17:34:08 +0100 Subject: [PATCH 2/2] increment version --- .buildlibrary | 2 +- CITATION.cff | 2 +- DESCRIPTION | 2 +- README.md | 6 +++--- man/mip-package.Rd | 1 - 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.buildlibrary b/.buildlibrary index 344012f..0e17154 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '29374785' +ValidationKey: '29394566' AcceptedWarnings: - 'Warning: package ''.*'' was built under R version' - 'Warning: namespace ''.*'' is not available and has been replaced' diff --git a/CITATION.cff b/CITATION.cff index 0fc8414..c008c07 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -2,7 +2,7 @@ cff-version: 1.2.0 message: If you use this software, please cite it using the metadata from this file. type: software title: 'mip: Comparison of multi-model runs' -version: 0.148.5 +version: 0.148.6 date-released: '2024-02-28' abstract: Package contains generic functions to produce comparison plots of multi-model runs. diff --git a/DESCRIPTION b/DESCRIPTION index d1ef215..669e6b8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: mip Title: Comparison of multi-model runs -Version: 0.148.5 +Version: 0.148.6 Date: 2024-02-28 Authors@R: c( person("David", "Klein", , "dklein@pik-potsdam.de", role = c("aut", "cre")), diff --git a/README.md b/README.md index 73f119e..8c88867 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Comparison of multi-model runs -R package **mip**, version **0.148.5** +R package **mip**, version **0.148.6** [![CRAN status](https://www.r-pkg.org/badges/version/mip)](https://cran.r-project.org/package=mip) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1158586.svg)](https://doi.org/10.5281/zenodo.1158586) [![R build status](https://github.com/pik-piam/mip/workflows/check/badge.svg)](https://github.com/pik-piam/mip/actions) [![codecov](https://codecov.io/gh/pik-piam/mip/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/mip) [![r-universe](https://pik-piam.r-universe.dev/badges/mip)](https://pik-piam.r-universe.dev/builds) @@ -47,7 +47,7 @@ In case of questions / problems please contact David Klein , R package version 0.148.5, . +Klein D, Dietrich J, Baumstark L, Humpenoeder F, Stevanovic M, Wirth S, Führlich P, Richters O, Rüter T (2024). _mip: Comparison of multi-model runs_. doi:10.5281/zenodo.1158586 , R package version 0.148.6, . A BibTeX entry for LaTeX users is @@ -56,7 +56,7 @@ A BibTeX entry for LaTeX users is title = {mip: Comparison of multi-model runs}, author = {David Klein and Jan Philipp Dietrich and Lavinia Baumstark and Florian Humpenoeder and Miodrag Stevanovic and Stephen Wirth and Pascal Führlich and Oliver Richters and Tonn Rüter}, year = {2024}, - note = {R package version 0.148.5}, + note = {R package version 0.148.6}, doi = {10.5281/zenodo.1158586}, url = {https://github.com/pik-piam/mip}, } diff --git a/man/mip-package.Rd b/man/mip-package.Rd index 6ac9051..98e5439 100644 --- a/man/mip-package.Rd +++ b/man/mip-package.Rd @@ -3,7 +3,6 @@ \docType{package} \name{mip-package} \alias{mip-package} -\alias{_PACKAGE} \alias{mip} \title{The MIP R package} \description{