Skip to content

Commit

Permalink
Replace RColorBrewer by base R equivalent (#136)
Browse files Browse the repository at this point in the history
* Replace RColorBrewer by base R equivalent

* Explicitly list grDevices as dependency

This is not strictly necessary as grDevices is a base package but it is still generally seen as better practice
  • Loading branch information
Bisaloo committed Jul 29, 2024
1 parent fd25474 commit d63a3b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ URL: https://epiverse-trace.github.io/epiCo/,
https://github.com/epiverse-trace/epiCo
BugReports: https://github.com/epiverse-trace/epiCo/issues
Depends:
R (>= 3.2.0)
R (>= 4.0.0)
Imports:
dplyr,
ggplot2,
ggraph,
grDevices,
igraph,
incidence,
leaflet,
lubridate,
magrittr,
RColorBrewer,
rlang,
scales,
spdep,
Expand Down
4 changes: 2 additions & 2 deletions R/demographics.R
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ occupation_plot <- function(occupation_data, sex = FALSE, q = 0.9) {
treemapify::geom_treemap() +
ggplot2::scale_fill_manual(
name = "Major Group",
values = RColorBrewer::brewer.pal(n = 12, name = "Set3")
values = grDevices::palette.colors(n = 12, palette = "Set3")
) +
treemapify::geom_treemap_text(
colour = "grey16", place = "centre",
Expand Down Expand Up @@ -908,7 +908,7 @@ occupation_plot_circular <- function(occupation_data, q = 0.9) {
ggraph::geom_node_circle(ggplot2::aes(fill = .data$sub_major)) +
ggplot2::scale_fill_manual(
name = "Major Group",
values = RColorBrewer::brewer.pal(n = 12, name = "Set3"),
values = grDevices::palette.colors(n = 12, palette = "Set3"),
labels = circle_vertices$sub_major
) +
ggraph::geom_node_text(ggplot2::aes(label = .data$unit)) +
Expand Down

0 comments on commit d63a3b4

Please sign in to comment.