Skip to content

Commit

Permalink
Merge pull request #109 from IOHprofiler/Color_upload_fix
Browse files Browse the repository at this point in the history
Color upload fix
  • Loading branch information
Dvermetten authored Nov 13, 2023
2 parents ce40548 + 81fc425 commit a909a54
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: IOHanalyzer
Type: Package
Title: Data Analysis Part of 'IOHprofiler'
Version: 0.1.8.3
Version: 0.1.8.4
Maintainer: Diederick Vermetten <d.l.vermetten@liacs.leidenuniv.nl>
Authors@R: c(
person("Hao", "Wang", email = "h.wang@liacs.leidenuniv.nl", role = "aut", comment = c(ORCID = "0000-0002-4933-5181")),
Expand Down
6 changes: 3 additions & 3 deletions R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ create_color_scheme <- function(ids) {
if (length(ids) == 0) {
return(NULL)
}
ids <- sort(ids)
ids <- sort(ids, method='radix')
colors <- color_palettes(length(ids))
linestyles <- rep(c("solid", "dash", "dot"), ceiling(length(colors)/3))[1:length(colors)]
IOHanalyzer_env$id_colors <- data.table(ids, colors, linestyles)
Expand All @@ -257,7 +257,7 @@ create_color_scheme <- function(ids) {
#' @examples
#' get_color_scheme(get_algId(dsl))
get_color_scheme <- function(ids_in){
ids_in <- sort(ids_in)
ids_in <- sort(ids_in, method='radix')
if (is.null(IOHanalyzer_env$id_colors))
create_color_scheme(ids_in)
cdt <- IOHanalyzer_env$id_colors
Expand All @@ -279,7 +279,7 @@ get_color_scheme <- function(ids_in){
#' @examples
#' get_line_style(get_algId(dsl))
get_line_style <- function(ids_in){
ids_in <- sort(ids_in)
ids_in <- sort(ids_in, method='radix')
if (is.null(IOHanalyzer_env$id_colors))
create_color_scheme(ids_in)
cdt <- IOHanalyzer_env$id_colors
Expand Down

0 comments on commit a909a54

Please sign in to comment.