Skip to content

Commit

Permalink
Merge branch 'sg-palettes' of github.com:DataScienceScotland/sgplot i…
Browse files Browse the repository at this point in the history
…nto sg-palettes
  • Loading branch information
alice-hannah committed Aug 25, 2023
2 parents 3a3460a + f2dc24f commit 17ea1ec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 42 deletions.
8 changes: 2 additions & 6 deletions R/sg_palette.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,8 @@ sg_palette <- function(palette = "main",
n_available <- length(palette_list[[palette]])

# Use 'main2' if AF main palette used and only 2 colours required
if (
palette_type == "af" &&
n == 2 &&
palette != "main2" &&
grepl("main", palette)
) {
if (palette_type == "af" && n == 2 &&
palette != "main2" && grepl("main", palette)) {

Check warning on line 33 in R/sg_palette.R

View workflow job for this annotation

GitHub Actions / lint

file=R/sg_palette.R,line=33,col=8,[indentation_linter] Indentation should be 10 spaces but is 8 spaces.
palette <- "main2"
cli::cli_warn(c(
"!" = "Using `main2` as only two colours are required."
Expand Down
42 changes: 6 additions & 36 deletions man/figures/README-ex2-1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 17ea1ec

Please sign in to comment.