diff --git a/README.md b/README.md index 7261744289fb1043a8b9ab665d6259732388e1d8..76d3c7e0a7d6272a45e1d5950ebb63d1d56720e6 100755 --- a/README.md +++ b/README.md @@ -118,6 +118,12 @@ Gitlab developers ## WHAT'S NEW IN +### v12.8.0 + +- Warning: functions relatives to the cute/trust packages have been removed -> correct only the cute_little_R_functions.R file if necessary +- bug fixed in fun_gg_donut about palette and color + + ### v12.7.0 - bug fixed for the arg.check object inside all the functions diff --git a/cute_little_R_functions.R b/cute_little_R_functions.R index 7f87f5de77402104f2e5a18fd9ecbc994b67f3d2..c4204fd5c6d9cfb5616b026c45bc76933bbbab1a 100755 --- a/cute_little_R_functions.R +++ b/cute_little_R_functions.R @@ -14425,7 +14425,8 @@ fun_gg_donut <- function( assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::scale_fill_brewer(palette = fill.palette, name = legend.name)) }else if( ! is.null(fill.color)){ assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::scale_fill_manual(values = fill.color, name = legend.name, na.value = "white")) - }else if( ! is.null(legend.name)){ + } + if(legend.name != ""){ assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::labs(fill = legend.name)) # title of the legend } diff --git a/examples_fun_gg_donut.R b/examples_fun_gg_donut.R index c7a26528281589988222c141ca49b0419baf1452..39f7221728cac454a93d9ffa4c791e8707fef5ff 100644 --- a/examples_fun_gg_donut.R +++ b/examples_fun_gg_donut.R @@ -35,7 +35,7 @@ fun_gg_donut(data1 = obs1, freq = "Km", categ = "Car", # The fill.color argument overrides the fill.palette argument fun_gg_donut(data1 = obs1, freq = "Km", categ = "Car", - fill.palette = "BrBG", + fill.palette = "Spectral", fill.color = obs1$Color1 ) # Using the fill.color argument (as elements from colors()) diff --git a/fun_gg_donut.R b/fun_gg_donut.R index 71d3688b70835df6032b6dc94d43c6fb6cfcbd28..cb0e97e109103b1fd76341ac54d8fa7576cd39e3 100644 --- a/fun_gg_donut.R +++ b/fun_gg_donut.R @@ -594,7 +594,8 @@ fun_gg_donut <- function( assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::scale_fill_brewer(palette = fill.palette, name = legend.name)) }else if( ! is.null(fill.color)){ assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::scale_fill_manual(values = fill.color, name = legend.name, na.value = "white")) - }else if( ! is.null(legend.name)){ + } + if(legend.name != ""){ assign(paste0(tempo.gg.name, tempo.gg.count <- tempo.gg.count + 1), ggplot2::labs(fill = legend.name)) # title of the legend }