Skip to content

Commit

Permalink
Merge pull request #199 from marcosfabietti/issue.#.196.inconsistent.…
Browse files Browse the repository at this point in the history
…colours
  • Loading branch information
tomjemmett authored Dec 11, 2023
2 parents 323acf3 + 5ff22d1 commit c36729d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
16 changes: 8 additions & 8 deletions R/ptd_spc_colours.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
#'
#' @export
ptd_spc_colours <- function(
common_cause = "#7b7d7d",
special_cause_improvement = "#289de0", # blue
special_cause_neutral = "#361475", # purple
special_cause_concern = "#fab428", # orange
value_line = "#7b7d7d",
common_cause = "#a6a6a6",
special_cause_improvement = "#00b0f0", # blue
special_cause_neutral = "#490092", # purple
special_cause_concern = "#e46c0a", # orange
value_line = "#a6a6a6",
mean_line = "#000000",
lpl = "#7b7d7d",
upl = "#7b7d7d",
lpl = "#a6a6a6",
upl = "#a6a6a6",
target = "#de1b1b",
trajectory = "#361475") {
trajectory = "#490092") {
structure(
list(
common_cause = common_cause,
Expand Down
4 changes: 2 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ sub_set %>%
In addition, you can use summary() function to get some basic statistics about your SPC data frame.
The function prints the SPC options, and then returns the summarised results as a table:
```{r, eval=TRUE}
summary<-sub_set %>%
ptd_spc(value_field = breaches, date_field = period, improvement_direction = "decrease",target=1200) %>%
summary <- sub_set %>%
ptd_spc(value_field = breaches, date_field = period, improvement_direction = "decrease", target = 1200) %>%
summary()
```

Expand Down
16 changes: 8 additions & 8 deletions man/ptd_spc_colours.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions tests/testthat/test-ptd_create_ggplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -333,14 +333,14 @@ test_that("it sets the colour of the points based on the type", {
)

colours_neutral <- list(
common_cause = "#7b7d7d", # grey
special_cause_neutral = "#361475" # purple
common_cause = "#a6a6a6", # grey
special_cause_neutral = "#490092" # purple
)

colours_otherwise <- list(
common_cause = "#7b7d7d", # grey
special_cause_improvement = "#289de0", # blue
special_cause_concern = "#fab428" # orange
common_cause = "#a6a6a6", # grey
special_cause_improvement = "#00b0f0", # blue
special_cause_concern = "#e46c0a" # orange
)

# case 1: improvement_direction = neutral
Expand Down

0 comments on commit c36729d

Please sign in to comment.