diff --git a/DESCRIPTION b/DESCRIPTION index 94215376..a76f7e85 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: grattantheme Type: Package Title: Create Graphs in the Grattan Institute Style -Version: 0.11.1 +Version: 1.0.0 Authors@R: c( person("Matt", "Cowgill", email = "matthew.cowgill@grattaninstitute.edu.au", role = c("aut")), @@ -12,27 +12,31 @@ Description: Enables the user to create ggplot2 charts that conform License: MIT + file LICENSE Depends: R (>= 3.5.0) Imports: + clipr, + cowsay, + dplyr, ggrepel (>= 0.8.0), ggplot2 (>= 3.3.0), glue, - purrr (>= 0.3.0), - knitr (>= 1.22), - rmarkdown (>= 1.12), gridExtra, + grDevices, + fs, + knitr (>= 1.22), + lifecycle, + rmarkdown (>= 1.12), patchwork (>= 1.0.0), + praise, + purrr (>= 0.3.0), + officer, openxlsx (>= 4.1.0.1), - stringr, rstudioapi, - officer, rvg, - clipr, + stringr, utils, - gdtools, - fs VignetteBuilder: knitr Encoding: UTF-8 LazyData: true -RoxygenNote: 7.2.0 +RoxygenNote: 7.2.1 Suggests: assertthat, testthat (>= 2.1.0), diff --git a/NAMESPACE b/NAMESPACE index 5cd26baf..919bd34a 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -5,22 +5,164 @@ export(colour_text) export(create_fullslide) export(export_latex_code) export(grattan_arrow) +export(grattan_black) +export(grattan_blue) +export(grattan_blue1) +export(grattan_blue2) +export(grattan_blue3) +export(grattan_blue4) +export(grattan_blue5) +export(grattan_blue6) +export(grattan_blue7) +export(grattan_blue8) +export(grattan_box) export(grattan_colour_manual) +export(grattan_darkblue) +export(grattan_darkblue1) +export(grattan_darkblue2) +export(grattan_darkblue3) +export(grattan_darkblue4) +export(grattan_darkblue5) +export(grattan_darkblue6) +export(grattan_darkblue7) +export(grattan_darkblue8) +export(grattan_darkgrey) +export(grattan_darkgrey1) +export(grattan_darkgrey2) +export(grattan_darkgrey3) +export(grattan_darkgrey4) +export(grattan_darkgrey5) +export(grattan_darkgrey6) +export(grattan_darkgrey7) +export(grattan_darkgrey8) +export(grattan_darkorange) +export(grattan_darkorange1) +export(grattan_darkorange2) +export(grattan_darkorange3) +export(grattan_darkorange4) +export(grattan_darkorange5) +export(grattan_darkorange6) +export(grattan_darkorange7) +export(grattan_darkorange8) +export(grattan_darkred) +export(grattan_darkred1) +export(grattan_darkred2) +export(grattan_darkred3) +export(grattan_darkred4) +export(grattan_darkred5) +export(grattan_darkred6) +export(grattan_darkred7) +export(grattan_darkred8) +export(grattan_darkyellow) +export(grattan_darkyellow1) +export(grattan_darkyellow2) +export(grattan_darkyellow3) +export(grattan_darkyellow4) +export(grattan_darkyellow5) +export(grattan_darkyellow6) +export(grattan_darkyellow7) +export(grattan_darkyellow8) export(grattan_fill_manual) +export(grattan_grey1) +export(grattan_grey2) +export(grattan_grey3) +export(grattan_grey4) +export(grattan_grey5) +export(grattan_grey_alpha) +export(grattan_grey_title) +export(grattan_gridlinegrey) export(grattan_label) export(grattan_label_repel) +export(grattan_lightblue) +export(grattan_lightblue1) +export(grattan_lightblue2) +export(grattan_lightblue3) +export(grattan_lightblue4) +export(grattan_lightblue5) +export(grattan_lightblue6) +export(grattan_lightblue7) +export(grattan_lightblue8) +export(grattan_lightgrey) +export(grattan_lightgrey1) +export(grattan_lightgrey2) +export(grattan_lightgrey3) +export(grattan_lightgrey4) +export(grattan_lightgrey5) +export(grattan_lightgrey6) +export(grattan_lightgrey7) +export(grattan_lightgrey8) +export(grattan_lightorange) +export(grattan_lightorange1) +export(grattan_lightorange2) +export(grattan_lightorange3) +export(grattan_lightorange4) +export(grattan_lightorange5) +export(grattan_lightorange6) +export(grattan_lightorange7) +export(grattan_lightorange8) +export(grattan_lightred) +export(grattan_lightred1) +export(grattan_lightred2) +export(grattan_lightred3) +export(grattan_lightred4) +export(grattan_lightred5) +export(grattan_lightred6) +export(grattan_lightred7) +export(grattan_lightred8) +export(grattan_lightyellow) +export(grattan_lightyellow1) +export(grattan_lightyellow2) +export(grattan_lightyellow3) +export(grattan_lightyellow4) +export(grattan_lightyellow5) +export(grattan_lightyellow6) +export(grattan_lightyellow7) +export(grattan_lightyellow8) +export(grattan_orange) +export(grattan_orange1) +export(grattan_orange2) +export(grattan_orange3) +export(grattan_orange4) +export(grattan_orange5) +export(grattan_orange6) +export(grattan_orange7) +export(grattan_orange8) +export(grattan_orange_alpha) export(grattan_pal) +export(grattan_palettes) export(grattan_point_filled) +export(grattan_red) +export(grattan_red1) +export(grattan_red2) +export(grattan_red3) +export(grattan_red4) +export(grattan_red5) +export(grattan_red6) +export(grattan_red7) +export(grattan_red8) export(grattan_save) export(grattan_save_all) export(grattan_save_pptx) export(grattan_x_continuous) export(grattan_y_continuous) -export(make_presentation) -export(make_slide) +export(grattan_yellow) +export(grattan_yellow1) +export(grattan_yellow2) +export(grattan_yellow3) +export(grattan_yellow4) +export(grattan_yellow5) +export(grattan_yellow6) +export(grattan_yellow7) +export(grattan_yellow8) +export(make_grattan_pal) +export(make_grattan_pal_discrete) +export(register_palette) export(save_chartdata) +export(scale_colour_grattan) +export(scale_fill_grattan) export(scale_x_continuous_grattan) export(scale_y_continuous_grattan) +export(set_aesthetics) export(stitch_pdfs) export(theme_grattan) export(watermark) @@ -39,7 +181,6 @@ importFrom(ggplot2,update_geom_defaults) importFrom(ggrepel,geom_label_repel) importFrom(grid,arrow) importFrom(grid,convertX) -importFrom(knitr,opts_chunk) importFrom(officer,on_slide) importFrom(officer,ph_location_label) importFrom(officer,ph_with) @@ -59,9 +200,6 @@ importFrom(patchwork,wrap_plots) importFrom(purrr,map) importFrom(purrr,walk) importFrom(purrr,walk2) -importFrom(rmarkdown,pandoc_available) -importFrom(rmarkdown,pandoc_version) -importFrom(rmarkdown,render) importFrom(rstudioapi,getActiveDocumentContext) importFrom(rvg,dml) importFrom(tools,file_path_sans_ext) diff --git a/NEWS.md b/NEWS.md index 7bcc4a59..5c7494bf 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,25 @@ +# grattantheme 1.0.0 +### Colours +* deprecate `grattan_fill_manual` and `grattan_fill_manual` in favour of a different implementation of `scale_fill_manual` and `scale_colour_manual` +* set default geoms on load +* change colours from being called as data and rather being called as objects +* creates a base colour and uses `grDevices::colorRampPalette` to make the lighter/darker permutations +* deprecates `grattan_pal` in favour of `make_grattan_pal` and `make_grattan_pal_discrete` + +### Chart templates +* deprecate `create_pptx_shell` and `create_slide_shell` as `officer` now offers functionality to edit notes directly +* makes the caption a text box and placeholder for easier editing +* includes the template for the new theme +* updates the older templates for better caption management +* removes the `helvetica` font choice as arial is now the standard font choice + +### Clean up +* delete `make_slide` as it was deprecated +* rename `chart_helper.R` to `chart_helpers.R` +* delete deprecated chart templates +* simplifies `grattan_arrow` test as it was failing + + # grattantheme 0.11.1 * fix the slide template so slide number stops appearing in the top right hand corner when copying slides across decks diff --git a/R/chart_helper.R b/R/chart_helpers.R similarity index 100% rename from R/chart_helper.R rename to R/chart_helpers.R diff --git a/R/colours.R b/R/colours.R deleted file mode 100644 index 7cadec12..00000000 --- a/R/colours.R +++ /dev/null @@ -1,889 +0,0 @@ -#' Hex code for the colour: Grattan Light Yellow (corn chowder) -#' -#' #FFE07F -#' -"grattan_lightyellow" - -#' Hex code for the colour: Grattan Light Yellow [tint 1] -#' -#' #FFE38C -#' -"grattan_lightyellow1" - -#' Hex code for the colour: Grattan Light Yellow [tint 2] -#' -#' #FFE699 -#' -"grattan_lightyellow2" - -#' Hex code for the colour: Grattan Light Yellow [tint 3] -#' -#' #FFE9A5 -#' -"grattan_lightyellow3" - -#' Hex code for the colour: Grattan Light Yellow [tint 4] -#' -#' #FFECB2 -#' -"grattan_lightyellow4" - -#' Hex code for the colour: Grattan Light Yellow [tint 5] -#' -#' #FFF0BF -#' -"grattan_lightyellow5" - -#' Hex code for the colour: Grattan Light Yellow [tint 6] -#' -#' #FFF3CC -#' -"grattan_lightyellow6" - -#' Hex code for the colour: Grattan Light Yellow [tint 7] -#' -#' #FFF6D9 -#' -"grattan_lightyellow7" - -#' Hex code for the colour: Grattan Light Yellow [tint 8] -#' -#' #FFF9E5 -#' -"grattan_lightyellow8" - -#' Hex code for the colour: Grattan Dark Yellow (butternut pumpkin soup) -#' -#' #FFC35A -#' -"grattan_darkyellow" - -#' Hex code for the colour: Grattan Dark Yellow [tint 1] -#' -#' #FFC96B -#' -"grattan_darkyellow1" - -#' Hex code for the colour: Grattan Dark Yellow [tint 2] -#' -#' #FFCF7B -#' -"grattan_darkyellow2" - -#' Hex code for the colour: Grattan Dark Yellow [tint 3] -#' -#' #FFD58C -#' -"grattan_darkyellow3" - -#' Hex code for the colour: Grattan Dark Yellow [tint 4] -#' -#' #FFDB9C -#' -"grattan_darkyellow4" - -#' Hex code for the colour: Grattan Dark Yellow [tint 5] -#' -#' #FFE1AD -#' -"grattan_darkyellow5" - -#' Hex code for the colour: Grattan Dark Yellow [tint 6] -#' -#' #FFE7BD -#' -"grattan_darkyellow6" - -#' Hex code for the colour: Grattan Dark Yellow [tint 7] -#' -#' #FFEDCE -#' -"grattan_darkyellow7" - -#' Hex code for the colour: Grattan Dark Yellow [tint 8] -#' -#' #FFF3DE -#' -"grattan_darkyellow8" - -#' Hex code for the colour: Grattan Light Orange (sweet potato soup) -#' -#' #F68B33 -#' -"grattan_lightorange" - -#' Hex code for the colour: Grattan Light Orange [tint 1] -#' -#' #F79747 -#' -"grattan_lightorange1" - -#' Hex code for the colour: Grattan Light Orange [tint 2] -#' -#' #F8A25C -#' -"grattan_lightorange2" - -#' Hex code for the colour: Grattan Light Orange [tint 3] -#' -#' #F9AE70 -#' -"grattan_lightorange3" - -#' Hex code for the colour: Grattan Light Orange [tint 4] -#' -#' #FAB985 -#' -"grattan_lightorange4" - -#' Hex code for the colour: Grattan Light Orange [tint 5] -#' -#' #FBC599 -#' -"grattan_lightorange5" - -#' Hex code for the colour: Grattan Light Orange [tint 6] -#' -#' #FBD1AD -#' -"grattan_lightorange6" - -#' Hex code for the colour: Grattan Light Orange [tint 7] -#' -#' #FCDCC2 -#' -"grattan_lightorange7" - -#' Hex code for the colour: Grattan Light Orange [tint 8] -#' -#' #FDE8D6 -#' -"grattan_lightorange8" - -#' Hex code for the colour: Grattan Dark Orange (carrot soup) -#' -#' #D4582A -#' -"grattan_darkorange" - -#' Hex code for the colour: Grattan Dark Orange [tint 1] -#' -#' #D8693F -#' -"grattan_darkorange1" - -#' Hex code for the colour: Grattan Dark Orange [tint 2] -#' -#' #DD7955 -#' -"grattan_darkorange2" - -#' Hex code for the colour: Grattan Dark Orange [tint 3] -#' -#' #E18A6A -#' -"grattan_darkorange3" - -#' Hex code for the colour: Grattan Dark Orange [tint 4] -#' -#' #E59B7F -#' -"grattan_darkorange4" - -#' Hex code for the colour: Grattan Dark Orange [tint 5] -#' -#' #EAAC95 -#' -"grattan_darkorange5" - -#' Hex code for the colour: Grattan Dark Orange [tint 6] -#' -#' #EEBCAA -#' -"grattan_darkorange6" - -#' Hex code for the colour: Grattan Dark Orange [tint 7] -#' -#' #F2CDBF -#' -"grattan_darkorange7" - -#' Hex code for the colour: Grattan Dark Orange [tint 8] -#' -#' #F6DED4 -#' -"grattan_darkorange8" - -#' Hex code for the colour: Grattan Light Red (tomato soup) -#' -#' #A02226 -#' -"grattan_lightred" - -#' Hex code for the colour: Grattan Light Red [tint 1] -#' -#' #AA383C -#' -"grattan_lightred1" - -#' Hex code for the colour: Grattan Light Red [tint 2] -#' -#' #B34E51 -#' -"grattan_lightred2" - -#' Hex code for the colour: Grattan Light Red [tint 3] -#' -#' #BD6467 -#' -"grattan_lightred3" - -#' Hex code for the colour: Grattan Light Red [tint 4] -#' -#' #C67A7D -#' -"grattan_lightred4" - -#' Hex code for the colour: Grattan Light Red [tint 5] -#' -#' #D09193 -#' -"grattan_lightred5" - -#' Hex code for the colour: Grattan Light Red [tint 6] -#' -#' #D9A7A8 -#' -"grattan_lightred6" - -#' Hex code for the colour: Grattan Light Red [tint 7] -#' -#' #E3BDBE -#' -"grattan_lightred7" - -#' Hex code for the colour: Grattan Light Red [tint 8] -#' -#' #ECD3D4 -#' -"grattan_lightred8" - -#' Hex code for the colour: Grattan Dark Red (kidney bean soup) -#' -#' #621214 -#' -"grattan_darkred" - -#' Hex code for the colour: Grattan Dark Red [tint 1] -#' -#' #722A2C -#' -"grattan_darkred1" - -#' Hex code for the colour: Grattan Dark Red [tint 2] -#' -#' #814143 -#' -"grattan_darkred2" - -#' Hex code for the colour: Grattan Dark Red [tint 3] -#' -#' #91595B -#' -"grattan_darkred3" - -#' Hex code for the colour: Grattan Dark Red [tint 4] -#' -#' #A17172 -#' -"grattan_darkred4" - -#' Hex code for the colour: Grattan Dark Red [tint 5] -#' -#' #B1898A -#' -"grattan_darkred5" - -#' Hex code for the colour: Grattan Dark Red [tint 6] -#' -#' #C0A0A1 -#' -"grattan_darkred6" - -#' Hex code for the colour: Grattan Dark Red [tint 7] -#' -#' #D0B8B9 -#' -"grattan_darkred7" - -#' Hex code for the colour: Grattan Dark Red [tint 8] -#' -#' #E0D0D0 -#' -"grattan_darkred8" - -#' Hex code for the colour: Grattan Light Blue -#' -#' #A3C7DF -#' -"grattan_lightblue" - -#' Hex code for the colour: Grattan Light Blue [tint 1] -#' -#' #ACCDE2 -#' -"grattan_lightblue1" - -#' Hex code for the colour: Grattan Light Blue [tint 2] -#' -#' #B5D2E5 -#' -"grattan_lightblue2" - -#' Hex code for the colour: Grattan Light Blue [tint 3] -#' -#' #BFD8E9 -#' -"grattan_lightblue3" - -#' Hex code for the colour: Grattan Light Blue [tint 4] -#' -#' #C8DDEC -#' -"grattan_lightblue4" - -#' Hex code for the colour: Grattan Light Blue [tint 5] -#' -#' #D1E3EF -#' -"grattan_lightblue5" - -#' Hex code for the colour: Grattan Light Blue [tint 6] -#' -#' #DAE9F2 -#' -"grattan_lightblue6" - -#' Hex code for the colour: Grattan Light Blue [tint 7] -#' -#' #E3EEF5 -#' -"grattan_lightblue7" - -#' Hex code for the colour: Grattan Light Blue [tint 8] -#' -#' #EDF4F9 -#' -"grattan_lightblue8" - -#' Hex code for the colour: Grattan Dark Blue -#' -#' #3E81CE -#' -"grattan_darkblue" - -#' Hex code for the colour: Grattan Dark Blue [tint 1] -#' -#' #538FD4 -#' -"grattan_darkblue1" - -#' Hex code for the colour: Grattan Dark Blue [tint 2] -#' -#' #699DD9 -#' -"grattan_darkblue2" - -#' Hex code for the colour: Grattan Dark Blue [tint 3] -#' -#' #7EABDF -#' -"grattan_darkblue3" - -#' Hex code for the colour: Grattan Dark Blue [tint 4] -#' -#' #94B9E4 -#' -"grattan_darkblue4" - -#' Hex code for the colour: Grattan Dark Blue [tint 5] -#' -#' #A9C7E9 -#' -"grattan_darkblue5" - -#' Hex code for the colour: Grattan Dark Blue [tint 6] -#' -#' #BFD5EF -#' -"grattan_darkblue6" - -#' Hex code for the colour: Grattan Dark Blue [tint 7] -#' -#' #D4E3F4 -#' -"grattan_darkblue7" - -#' Hex code for the colour: Grattan Dark Blue [tint 8] -#' -#' #EAF1FA -#' -"grattan_darkblue8" - -#' Hex code for the colour: Grattan Light Grey -#' -#' #828282 -#' -"grattan_lightgrey" - -#' Hex code for the colour: Grattan Light Grey [tint 1] -#' -#' #8F8F8F -#' -"grattan_lightgrey1" - -#' Hex code for the colour: Grattan Light Grey [tint 2] -#' -#' #9B9B9B -#' -"grattan_lightgrey2" - -#' Hex code for the colour: Grattan Light Grey [tint 3] -#' -#' #A8A8A8 -#' -"grattan_lightgrey3" - -#' Hex code for the colour: Grattan Light Grey [tint 4] -#' -#' #B4B4B4 -#' -"grattan_lightgrey4" - -#' Hex code for the colour: Grattan Light Grey [tint 5] -#' -#' #C1C1C1 -#' -"grattan_lightgrey5" - -#' Hex code for the colour: Grattan Light Grey [tint 6] -#' -#' #CDCDCD -#' -"grattan_lightgrey6" - -#' Hex code for the colour: Grattan Light Grey [tint 7] -#' -#' #DADADA -#' -"grattan_lightgrey7" - -#' Hex code for the colour: Grattan Light Grey [tint 8] -#' -#' #E6E6E6 -#' -"grattan_lightgrey8" - -#' Hex code for the colour: Grattan Dark Grey -#' -#' #575757 -#' -"grattan_darkgrey" - -#' Hex code for the colour: Grattan Dark Grey [tint 1] -#' -#' #686868 -#' -"grattan_darkgrey1" - -#' Hex code for the colour: Grattan Dark Grey [tint 2] -#' -#' #797979 -#' -"grattan_darkgrey2" - -#' Hex code for the colour: Grattan Dark Grey [tint 3] -#' -#' #898989 -#' -"grattan_darkgrey3" - -#' Hex code for the colour: Grattan Dark Grey [tint 4] -#' -#' #9A9A9A -#' -"grattan_darkgrey4" - -#' Hex code for the colour: Grattan Dark Grey [tint 5] -#' -#' #ABABAB -#' -"grattan_darkgrey5" - -#' Hex code for the colour: Grattan Dark Grey [tint 6] -#' -#' #BCBCBC -#' -"grattan_darkgrey6" - -#' Hex code for the colour: Grattan Dark Grey [tint 7] -#' -#' #CDCDCD -#' -"grattan_darkgrey7" - -#' Hex code for the colour: Grattan Dark Grey [tint 8] -#' -#' #DDDDDD -#' -"grattan_darkgrey8" - - -#' Hex code for the colour: Grattan Yellow (alias for Grattan Dark Yellow) -#' -#' #FFC35A -#' -"grattan_yellow" - -#' Hex code for the colour: Grattan Yellow [tint 1] (alias for Grattan Dark Yellow1) -#' -#' #FFC96B -#' -"grattan_yellow1" - -#' Hex code for the colour: Grattan Yellow [tint 2] (alias for Grattan Dark Yellow2) -#' -#' #FFCF7B -#' -"grattan_yellow2" - -#' Hex code for the colour: Grattan Yellow [tint 3] (alias for Grattan Dark Yellow3) -#' -#' #FFD58C -#' -"grattan_yellow3" - -#' Hex code for the colour: Grattan Yellow [tint 4] (alias for Grattan Dark Yellow4) -#' -#' #FFDB9C -#' -"grattan_yellow4" - -#' Hex code for the colour: Grattan Yellow [tint 5] (alias for Grattan Dark Yellow5) -#' -#' #FFE1AD -#' -"grattan_yellow5" - -#' Hex code for the colour: Grattan Yellow [tint 6] (alias for Grattan Dark Yellow6) -#' -#' #FFE7BD -#' -"grattan_yellow6" - -#' Hex code for the colour: Grattan Yellow [tint 7] (alias for Grattan Dark Yellow7) -#' -#' #FFEDCE -#' -"grattan_yellow7" - -#' Hex code for the colour: Grattan Yellow [tint 8] (alias for Grattan Dark Yellow8) -#' -#' #FFF3DE -#' -"grattan_yellow8" - -#' Hex code for the colour: Grattan Orange (alias for Grattan Light Orange) -#' -#' #F68B33 -#' -"grattan_orange" - -#' Hex code for the colour: Grattan Orange [tint 1] (alias for Grattan Light Orange1) -#' -#' #F79747 -#' -"grattan_orange1" - -#' Hex code for the colour: Grattan Orange [tint 2] (alias for Grattan Light Orange2) -#' -#' #F8A25C -#' -"grattan_orange2" - -#' Hex code for the colour: Grattan Orange [tint 3] (alias for Grattan Light Orange3) -#' -#' #F9AE70 -#' -"grattan_orange3" - -#' Hex code for the colour: Grattan Orange [tint 4] (alias for Grattan Light Orange4) -#' -#' #FAB985 -#' -"grattan_orange4" - -#' Hex code for the colour: Grattan Orange [tint 5] (alias for Grattan Light Orange5) -#' -#' #FBC599 -#' -"grattan_orange5" - -#' Hex code for the colour: Grattan Orange [tint 6] (alias for Grattan Light Orange6) -#' -#' #FBD1AD -#' -"grattan_orange6" - -#' Hex code for the colour: Grattan Orange [tint 7] (alias for Grattan Light Orange7) -#' -#' #FCDCC2 -#' -"grattan_orange7" - -#' Hex code for the colour: Grattan Orange [tint 8] (alias for Grattan Light Orange8) -#' -#' #FDE8D6 -#' -"grattan_orange8" - -#' Hex code for the colour: Grattan Red (alias for Grattan Light Red) -#' -#' #A02226 -#' -"grattan_red" - -#' Hex code for the colour: Grattan Red [tint 1] (alias for Grattan Light Red1) -#' -#' #AA383C -#' -"grattan_red1" - -#' Hex code for the colour: Grattan Red [tint 2] (alias for Grattan Light Red2) -#' -#' #B34E51 -#' -"grattan_red2" - -#' Hex code for the colour: Grattan Red [tint 3] (alias for Grattan Light Red3) -#' -#' #BD6467 -#' -"grattan_red3" - -#' Hex code for the colour: Grattan Red [tint 4] (alias for Grattan Light Red4) -#' -#' #C67A7D -#' -"grattan_red4" - -#' Hex code for the colour: Grattan Red [tint 5] (alias for Grattan Light Red5) -#' -#' #D09193 -#' -"grattan_red5" - -#' Hex code for the colour: Grattan Red [tint 6] (alias for Grattan Light Red6) -#' -#' #D9A7A8 -#' -"grattan_red6" - -#' Hex code for the colour: Grattan Red [tint 7] (alias for Grattan Light Red7) -#' -#' #E3BDBE -#' -"grattan_red7" - -#' Hex code for the colour: Grattan Red [tint 8] (alias for Grattan Light Red8) -#' -#' #ECD3D4 -#' -"grattan_red8" - -#' Hex code for the colour: Grattan Blue (alias for Grattan Light Blue) -#' -#' #A3C7DF -#' -"grattan_blue" - -#' Hex code for the colour: Grattan Blue [tint 1] (alias for Grattan Light Blue1) -#' -#' #ACCDE2 -#' -"grattan_blue1" - -#' Hex code for the colour: Grattan Blue [tint 2] (alias for Grattan Light Blue2) -#' -#' #B5D2E5 -#' -"grattan_blue2" - -#' Hex code for the colour: Grattan Blue [tint 3] (alias for Grattan Light Blue3) -#' -#' #BFD8E9 -#' -"grattan_blue3" - -#' Hex code for the colour: Grattan Blue [tint 4] (alias for Grattan Light Blue4) -#' -#' #C8DDEC -#' -"grattan_blue4" - -#' Hex code for the colour: Grattan Blue [tint 5] (alias for Grattan Light Blue5) -#' -#' #D1E3EF -#' -"grattan_blue5" - -#' Hex code for the colour: Grattan Blue [tint 6] (alias for Grattan Light Blue6) -#' -#' #DAE9F2 -#' -"grattan_blue6" - -#' Hex code for the colour: Grattan Blue [tint 7] (alias for Grattan Light Blue7) -#' -#' #E3EEF5 -#' -"grattan_blue7" - -#' Hex code for the colour: Grattan Blue [tint 8] (alias for Grattan Light Blue8) -#' -#' #EDF4F9 -#' -"grattan_blue8" - - -#' Hex code for the colour: Grattan Black (normal black) -#' -#' #000000 -#' -"grattan_black" - - -#' Hex code for the colour: Grattan grey 1 (truffle soup) -#' -#' #D9D9D9 -#' -"grattan_grey1" - -#' Hex code for the colour: Grattan grey 2 (cream of mushroom soup) -#' -#' #AEAEAE -#' -"grattan_grey2" - -#' Hex code for the colour: Grattan grey 3 (morel mushroom soup) -#' -#' #828282 -#' -"grattan_grey3" - -#' Hex code for the colour: Grattan grey 4 (shiitake mushroom soup) -#' -#' #575757 -#' -"grattan_grey4" - -#' Hex code for the colour: Grattan grey 5 (blackbean soup) -#' -#' #2B2B2B -#' -"grattan_grey5" - -#' Hex code for the colour: Grattan 'forecast shading' grey -#' -#' #E1E3E5 -#' -"grattan_grey_alpha" - -#' Hex code for the colour: Grattan title grey -#' -#' #6A737B -#' -"grattan_grey_title" - -#' Hex code for the grey used for gridlines in Grattan charts -#' -#' #C3C7CB -#' -"grattan_gridlinegrey" - -#' Hex code for the colour used for Grattan box backgrounds (orange alpha) -#' -#' #FEF0DE -#' -"grattan_orange_alpha" - -#' Hex code for the colour used for Grattan box backgrounds (orange alpha) -#' -#' #FEF0DE -#' -"grattan_box" - - -#' A list of Grattan colour sets -#' -#' "full": red, dark orange, light orange, yellow, light yellow -#' "full_f": faded version of "full" -#' "light": light orange, yellow, light yellow -#' "dark": red, dark orange, light orange -#' "diverging": red, faded red, white, faded light orange, light orange -#' "grey": grey 1, grey 2, grey 3, grey 4, grey 5 -#' -"grattan_palette_set" - - -#' !Legacy, deprecated! -#' Hex code for the faded colour: Grattan light yellow (faded) -#' -#' #FFE79F -#' -"grattan_lightyellow_f" - -#' !Legacy, deprecated! -#' Hex code for the faded colour: Grattan yellow (faded) -#' -#' #FFD283 -#' -"grattan_yellow_f" - -#' !Legacy, deprecated! -#' Hex code for the faded colour: Grattan light orange (faded) -#' -#' #F8A866 -#' -"grattan_lightorange_f" - -#' !Legacy, deprecated! -#' Hex code for the faded colour: Grattan light orange (faded) -#' -#' #F8A866 -#' -"grattan_orange_f" - - -#' !Legacy, deprecated! -#' Hex code for the faded colour: Grattan dark orange (faded) -#' -#' #DE815F -#' -"grattan_darkorange_f" - - -#' !Legacy, deprecated! -#' Hex code for the faded colour: Grattan red (faded) -#' -#' #B7595C -#' -"grattan_red_f" - - -#' !Legacy, deprecated! -#' Hex code for the faded colour: Grattan dark red (faded) -#' -#' #894D4E -#' -"grattan_darkred_f" diff --git a/R/create_grattan_colours.R b/R/create_grattan_colours.R new file mode 100644 index 00000000..f7b894ea --- /dev/null +++ b/R/create_grattan_colours.R @@ -0,0 +1,958 @@ +# Define grattan colours ======================================================= +base_yellow <<- dplyr::if_else(options("grattan_palette") == "old", "#FFE07F", "#3E0E39") +base_darkyellow <- dplyr::if_else(options("grattan_palette") == "old", "#FFC35A", "#F5B50C") +base_orange <- "#F68B33" #unchanged +base_darkorange <- "#D4582A" #unchanged +base_red <- dplyr::if_else(options("grattan_palette") == "old", "#A02226", "#A1253E") +base_darkred <- dplyr::if_else(options("grattan_palette") == "old", "#621214", "#611633") +base_blue <- dplyr::if_else(options("grattan_palette") == "old", "#A3C7DF", "#6A99C4") +base_darkblue <- dplyr::if_else(options("grattan_palette") == "old", "#3E81CE", "#4371A1") + +# Yellow light ---- +yellow_palette <- grDevices::colorRampPalette(c(base_yellow, "white"))(10) + +#' grattan_lightyellow +#' +#' @export +#' +grattan_lightyellow <- yellow_palette[1] + +#' grattan_lightyellow1 +#' +#' @export +#' +grattan_lightyellow1 <- yellow_palette[2] + +#' grattan_lightyellow2 +#' +#' @export +#' +grattan_lightyellow2 <- yellow_palette[3] + +#' grattan_lightyellow3 +#' +#' @export +#' +grattan_lightyellow3 <- yellow_palette[4] + +#' grattan_lightyellow4 +#' +#' @export +#' +grattan_lightyellow4 <- yellow_palette[5] + +#' grattan_lightyellow5 +#' +#' @export +#' +grattan_lightyellow5 <- yellow_palette[6] +#' grattan_lightyellow6 +#' +#' @export +#' +grattan_lightyellow6 <- yellow_palette[7] + +#' grattan_lightyellow7 +#' +#' @export +#' +grattan_lightyellow7 <- yellow_palette[8] + +#' grattan_lightyellow8 +#' +#' @export +#' +grattan_lightyellow8 <- yellow_palette[9] + +# Yellow dark ---- +darkyellow_palette <- grDevices::colorRampPalette(c(base_darkyellow, "white"))(10) + +#' ' +#' +#' @export +#' +grattan_darkyellow <- darkyellow_palette[1] + +#' ' +#' +#' @export +#' +grattan_darkyellow1 <- darkyellow_palette[2] + +#' ' +#' +#' @export +#' +grattan_darkyellow2 <- darkyellow_palette[3] + +#' ' +#' +#' @export +#' +grattan_darkyellow3 <- darkyellow_palette[4] + +#' ' +#' +#' @export +#' +grattan_darkyellow4 <- darkyellow_palette[5] + +#' ' +#' +#' @export +#' +grattan_darkyellow5 <- darkyellow_palette[6] + +#' ' +#' +#' @export +#' +grattan_darkyellow6 <- darkyellow_palette[7] + +#' ' +#' +#' @export +#' +grattan_darkyellow7 <- darkyellow_palette[8] + +#' ' +#' +#' @export +#' +grattan_darkyellow8 <- darkyellow_palette[9] + + + +#' ' +#' +#' @export +#' +grattan_yellow <- grattan_darkyellow + + +#' ' +#' +#' @export +#' +grattan_yellow1 <- grattan_darkyellow1 + + +#' ' +#' +#' @export +#' +grattan_yellow2 <- grattan_darkyellow2 + + +#' ' +#' +#' @export +#' +grattan_yellow3 <- grattan_darkyellow3 + + +#' ' +#' +#' @export +#' +grattan_yellow4 <- grattan_darkyellow4 + + +#' ' +#' +#' @export +#' +grattan_yellow5 <- grattan_darkyellow5 + + +#' ' +#' +#' @export +#' +grattan_yellow6 <- grattan_darkyellow6 + + +#' ' +#' +#' @export +#' +grattan_yellow7 <- grattan_darkyellow7 + + +#' ' +#' +#' @export +#' +grattan_yellow8 <- grattan_darkyellow8 + + +# Orange light ---------- +orange_palette <- grDevices::colorRampPalette(c(base_orange, "white"))(10) + +#' ' +#' +#' @export +#' +grattan_lightorange <- orange_palette[1] + +#' ' +#' +#' @export +#' +grattan_lightorange1 <- orange_palette[2] + +#' ' +#' +#' @export +#' +grattan_lightorange2 <- orange_palette[3] + +#' ' +#' +#' @export +#' +grattan_lightorange3 <- orange_palette[4] + +#' ' +#' +#' @export +#' +grattan_lightorange4 <- orange_palette[5] + +#' ' +#' +#' @export +#' +grattan_lightorange5 <- orange_palette[6] + +#' ' +#' +#' @export +#' +grattan_lightorange6 <- orange_palette[7] + +#' ' +#' +#' @export +#' +grattan_lightorange7 <- orange_palette[8] + +#' ' +#' +#' @export +#' +grattan_lightorange8 <- orange_palette[9] + + +#' ' +#' +#' @export +#' +grattan_orange <- grattan_lightorange + +#' ' +#' +#' @export +#' +grattan_orange1 <- grattan_lightorange1 + +#' ' +#' +#' @export +#' +grattan_orange2 <- grattan_lightorange2 + +#' ' +#' +#' @export +#' +grattan_orange3 <- grattan_lightorange3 + +#' ' +#' +#' @export +#' +grattan_orange4 <- grattan_lightorange4 + +#' ' +#' +#' @export +#' +grattan_orange5 <- grattan_lightorange5 + +#' ' +#' +#' @export +#' +grattan_orange6 <- grattan_lightorange6 + +#' ' +#' +#' @export +#' +grattan_orange7 <- grattan_lightorange7 + +#' ' +#' +#' @export +#' +grattan_orange8 <- grattan_lightorange8 + + +# dark: +darkorange_palette <- grDevices::colorRampPalette(c(base_darkorange, "white"))(10) + + +#' ' +#' +#' @export +#' +grattan_darkorange <- darkorange_palette[1] + + +#' ' +#' +#' @export +#' +grattan_darkorange1 <- darkorange_palette[2] + + +#' ' +#' +#' @export +#' +grattan_darkorange2 <- darkorange_palette[3] + + +#' ' +#' +#' @export +#' +grattan_darkorange3 <- darkorange_palette[4] + + +#' ' +#' +#' @export +#' +grattan_darkorange4 <- darkorange_palette[5] + + +#' ' +#' +#' @export +#' +grattan_darkorange5 <- darkorange_palette[6] + + +#' ' +#' +#' @export +#' +grattan_darkorange6 <- darkorange_palette[7] + + +#' ' +#' +#' @export +#' +grattan_darkorange7 <- darkorange_palette[8] + + +#' ' +#' +#' @export +#' +grattan_darkorange8 <- darkorange_palette[9] + + + +# Red -------------- +# light: +red_palette <- grDevices::colorRampPalette(c(base_red, "white"))(10) + + +#' ' +#' +#' @export +#' +grattan_lightred <- red_palette[1] + + +#' ' +#' +#' @export +#' +grattan_lightred1 <- red_palette[2] + + +#' ' +#' +#' @export +#' +grattan_lightred2 <- red_palette[3] + + +#' ' +#' +#' @export +#' +grattan_lightred3 <- red_palette[4] + + +#' ' +#' +#' @export +#' +grattan_lightred4 <- red_palette[5] + + +#' ' +#' +#' @export +#' +grattan_lightred5 <- red_palette[6] + + +#' ' +#' +#' @export +#' +grattan_lightred6 <- red_palette[7] + + +#' ' +#' +#' @export +#' +grattan_lightred7 <- red_palette[8] + + +#' ' +#' +#' @export +#' +grattan_lightred8 <- red_palette[9] + + + +#' ' +#' +#' @export +#' +grattan_red <- grattan_lightred + + +#' ' +#' +#' @export +#' +grattan_red1 <- grattan_lightred1 + + +#' ' +#' +#' @export +#' +grattan_red2 <- grattan_lightred2 + + +#' ' +#' +#' @export +#' +grattan_red3 <- grattan_lightred3 + + +#' ' +#' +#' @export +#' +grattan_red4 <- grattan_lightred4 + + +#' ' +#' +#' @export +#' +grattan_red5 <- grattan_lightred5 + + +#' ' +#' +#' @export +#' +grattan_red6 <- grattan_lightred6 + + +#' ' +#' +#' @export +#' +grattan_red7 <- grattan_lightred7 + + +#' ' +#' +#' @export +#' +grattan_red8 <- grattan_lightred8 + + + +# dark: +darkred_palette <- grDevices::colorRampPalette(c(base_darkred, "white"))(10) + + +#' ' +#' +#' @export +#' +grattan_darkred <- darkred_palette[1] + + +#' ' +#' +#' @export +#' +grattan_darkred1 <- darkred_palette[2] + + +#' ' +#' +#' @export +#' +grattan_darkred2 <- darkred_palette[3] + + +#' ' +#' +#' @export +#' +grattan_darkred3 <- darkred_palette[4] + + +#' ' +#' +#' @export +#' +grattan_darkred4 <- darkred_palette[5] + + +#' ' +#' +#' @export +#' +grattan_darkred5 <- darkred_palette[6] + + +#' ' +#' +#' @export +#' +grattan_darkred6 <- darkred_palette[7] + +#' ' +#' +#' @export +#' +grattan_darkred7 <- darkred_palette[8] + +#' ' +#' +#' @export +#' +grattan_darkred8 <- darkred_palette[9] + +# Blue ------------------------------------------------------------------------- +# light: +blue_palette <- grDevices::colorRampPalette(c(base_blue, "white"))(10) + + +#' ' +#' +#' @export +#' +grattan_lightblue <- blue_palette[1] + + +#' ' +#' +#' @export +#' +grattan_lightblue1 <- blue_palette[2] + + +#' ' +#' +#' @export +#' +grattan_lightblue2 <- blue_palette[3] + + +#' ' +#' +#' @export +#' +grattan_lightblue3 <- blue_palette[4] + + +#' ' +#' +#' @export +#' +grattan_lightblue4 <- blue_palette[5] + + +#' ' +#' +#' @export +#' +grattan_lightblue5 <- blue_palette[6] + + +#' ' +#' +#' @export +#' +grattan_lightblue6 <- blue_palette[7] + + +#' ' +#' +#' @export +#' +grattan_lightblue7 <- blue_palette[8] + + +#' ' +#' +#' @export +#' +grattan_lightblue8 <- blue_palette[9] + + +#' ' +#' +#' @export +#' +grattan_blue <- grattan_lightblue + + +#' ' +#' +#' @export +#' +grattan_blue1 <- grattan_lightblue1 + + +#' ' +#' +#' @export +#' +grattan_blue2 <- grattan_lightblue2 + + +#' ' +#' +#' @export +#' +grattan_blue3 <- grattan_lightblue3 + + +#' ' +#' +#' @export +#' +grattan_blue4 <- grattan_lightblue4 + + +#' ' +#' +#' @export +#' +grattan_blue5 <- grattan_lightblue5 + + +#' ' +#' +#' @export +#' +grattan_blue6 <- grattan_lightblue6 + + +#' ' +#' +#' @export +#' +grattan_blue7 <- grattan_lightblue7 + + +#' ' +#' +#' @export +#' +grattan_blue8 <- grattan_lightblue8 + + + +# dark: +darkblue_palette <- grDevices::colorRampPalette(c(base_darkblue, "white"))(10) + +#' ' +#' +#' @export +#' +grattan_darkblue <- darkblue_palette[1] + +#' ' +#' +#' @export +#' +grattan_darkblue1 <- darkblue_palette[2] + +#' ' +#' +#' @export +#' +grattan_darkblue2 <- darkblue_palette[3] + +#' ' +#' +#' @export +#' +grattan_darkblue3 <- darkblue_palette[4] + +#' ' +#' +#' @export +#' +grattan_darkblue4 <- darkblue_palette[5] + +#' ' +#' +#' @export +#' +grattan_darkblue5 <- darkblue_palette[6] + +#' ' +#' +#' @export +#' +grattan_darkblue6 <- darkblue_palette[7] +#' ' +#' +#' @export +#' +grattan_darkblue7 <- darkblue_palette[8] + +#' ' +#' +#' @export +#' +grattan_darkblue8 <- darkblue_palette[9] + + +# black ---- + +#' ' +#' +#' @export +#' +grattan_black <- "#000000" + +# grey ------ + +# light + +#' ' +#' +#' @export +#' +grattan_lightgrey <- "#828282" + +#' ' +#' +#' @export +#' +grattan_lightgrey1 <- "#8F8F8F" + +#' ' +#' +#' @export +#' +grattan_lightgrey2 <- "#9B9B9B" + +#' ' +#' +#' @export +#' +grattan_lightgrey3 <- "#A8A8A8" + +#' ' +#' +#' @export +#' +grattan_lightgrey4 <- "#B4B4B4" + +#' ' +#' +#' @export +#' +grattan_lightgrey5 <- "#C1C1C1" + +#' ' +#' +#' @export +#' +grattan_lightgrey6 <- "#CDCDCD" + + + +#' ' +#' +#' @export +#' +grattan_lightgrey7 <- "#DADADA" + +#' ' +#' +#' @export +#' +grattan_lightgrey8 <- "#E6E6E6" + +# dark +#' ' +#' +#' @export +#' +grattan_darkgrey <- "#575757" + +#' ' +#' +#' @export +#' +grattan_darkgrey1 <- "#686868" + +#' ' +#' +#' @export +#' +grattan_darkgrey2 <- "#797979" + +#' ' +#' +#' @export +#' +grattan_darkgrey3 <- "#898989" + +#' ' +#' +#' @export +#' +grattan_darkgrey4 <- "#9A9A9A" + +#' ' +#' +#' @export +#' +grattan_darkgrey5 <- "#ABABAB" + +#' ' +#' +#' @export +#' +grattan_darkgrey6 <- "#BCBCBC" + +#' ' +#' +#' @export +#' +grattan_darkgrey7 <- "#CDCDCD" + +#' ' +#' +#' @export +#' +grattan_darkgrey8 <- "#DDDDDD" + +# Add other specific Grattan colours +#' ' +#' +#' @export +#' +grattan_grey1 <- "#D9D9D9" + +#' ' +#' +#' @export +#' +grattan_grey2 <- "#AEAEAE" + +#' ' +#' +#' @export +#' +grattan_grey3 <- "#828282" + +#' ' +#' +#' @export +#' +grattan_grey4 <- "#575757" + +#' ' +#' +#' @export +#' +grattan_grey5 <- "#2B2B2B" + +#' ' +#' +#' @export +#' +grattan_grey_alpha <- "#E1E3E5" + +#' grattan_grey_title +#' +#' @export +#' +grattan_grey_title <- "#6A737B" + +#' grattan_gridlinegrey +#' +#' @export +#' +grattan_gridlinegrey <- "#C3C7CB" + +#' ' +#' +#' @export +#' +grattan_orange_alpha <- "#FEF0DE" + +#' ' +#' +#' @export +#' +grattan_box <- "#FEF0DE" + +# Add legacy items +grattan_lightyellow_f <- "#FFE79F" +grattan_yellow_f <- "#FFD283" +grattan_lightorange_f <- "#F8A866" +grattan_orange_f <- "#F8A866" +grattan_darkorange_f <- "#DE815F" +grattan_red_f <- "#B7595C" +grattan_darkred_f <- "#894D4E" + + +#' A list of Grattan colour sets +#' +#' "full": red, dark orange, light orange, yellow, light yellow +#' "full_f": faded version of "full" +#' "light": light orange, yellow, light yellow +#' "dark": red, dark orange, light orange +#' "diverging": red, faded red, white, faded light orange, light orange +#' "grey": grey 1, grey 2, grey 3, grey 4, grey 5 +"grattan_palette_set" diff --git a/R/grattan_axes.R b/R/grattan_axes.R index 8dee6be1..7e2d101f 100644 --- a/R/grattan_axes.R +++ b/R/grattan_axes.R @@ -67,7 +67,7 @@ NULL #' @export grattan_y_continuous <- function(expand_bottom = 0, expand_top = 0.015, ...) { - scale_y_continuous(expand = ggplot2::expansion(mult = c(expand_bottom, + ggplot2::scale_y_continuous(expand = ggplot2::expansion(mult = c(expand_bottom, expand_top)), ...) } @@ -93,7 +93,7 @@ grattan_x_continuous <- function(expand_left = 0, expand_right = 0.015, ...) { - scale_x_continuous(expand = ggplot2::expansion(mult = c(expand_left, + ggplot2::scale_x_continuous(expand = ggplot2::expansion(mult = c(expand_left, expand_right)), ...) diff --git a/R/grattan_pal.R b/R/grattan_pal.R index 35fe73c7..bb0f4465 100644 --- a/R/grattan_pal.R +++ b/R/grattan_pal.R @@ -1,3 +1,116 @@ +#' Predefined grattan colours combined into palettes +#' +#' This is a list of grattan colours combined into palettes. The palettes are used +#' for different plots and maps. +#' @export +grattan_palettes <- list( + `graph` = c(grattan_orange, + grattan_red, + grattan_yellow, + grattan_darkorange, + grattan_darkred, + grattan_lightyellow, + grattan_blue, + grattan_darkblue, + grattan_lightgrey, + grattan_darkgrey), + `sequential` = c(grattan_darkred, grattan_orange, grattan_yellow), + `diverging` = c(grattan_darkred, grattan_orange, grattan_blue) +) + +#' Interpolate a grattan colour palette +#' +#' This function takes a grattan colour palette and generates more colours from it, +#' so that there are enough to make your chart. +#' +#' The interpolation method is set to "spline" (the default is "linear") in an +#' attempt to reduce the number of vomit colours that get produced when +#' generating many colours. +#' +#' It returns a function that takes a single value and makes that many colours. +#' +#' @param palette (character; default = \code{"graph"}) given name of a grattan +#' palette: \code{\link{grattan_palettes}} +#' @param reverse (boolean; default = \code{FALSE}) indicating if palette should +#' be reverse +#' @param ... Additional arguments to pass to \code{colorRampPalette} see +#' details here \code{\link[grDevices]{colorRamp}} +#' +#' @seealso \code{\link{grattan_palettes}} +#' +#' @examples +#' +#' ggplot2::ggplot(mtcars, ggplot2::aes(x = mpg, y = hp, colour = as.character(wt))) + +#' ggplot2::geom_point() + +#' ggplot2::scale_colour_manual(values = make_grattan_pal()(29)) +#' +#' @export +make_grattan_pal <- function(palette = "sequential", + reverse = FALSE, + ...) { + + assertthat::assert_that(palette %in% c("graph", "sequential", "diverging"), + msg = "Palette isn't one of `graph`, `sequential` or `diverging`") + + pal <- grattan_palettes[[palette]] + + if (reverse) pal <- rev(pal) + + grDevices::colorRampPalette( + pal, + ..., + interpolate = "spline" + ) +} + +#' Create a grattan colour palette +#' +#' This function takes a the grattan graph colour palette and returns a vector of colours equal to n. +#' It is used in \code{\link{scale_colour_grattan}} and \code{\link{scale_fill_grattan}} to make the discrete +#' colour scale as the order of colours is specific in the grattan branding guides and so using an interpolated scale +#' does not work. +#' +#' +#' @param n how many colours to return +#' +#' @seealso \code{\link{grattan_palettes}} +#' +#' @export +make_grattan_pal_discrete <- function(n) { + assertthat::assert_that(n <= 10, + msg = "Chart requires more than 10 colours. Consider a continuous palette or make a palette with more colours own using `make_grattan_pal(palette = 'graph')` e.g. `scale_colour_manual(values = make_grattan_pal(palette = 'graph')(29))") + pal <- grattan_palettes[["graph"]] + + return(pal[1:n]) +} + +#' Register the option for which palette to use. +#' +#' Grattan now has an old palette and a new palette. Depending which is needed users can +#' set options("grattan_palette" = "old") to have the colours map to the old colours. Otherwise the colours +#' default to the new colours. +#' +#' @export +register_palette <- function() { + palette_option <- options("grattan_palette") + if (is.null(palette_option$grattan_palette)) { + message("No palette option declared for grattantheme, setting it to the latest") + options("grattan_palette" = "latest") + } +} + +### Deprecated #### +# Generates a full palette +# deprecated in version 1.0.0 +grattan_palette <- function(palette = "full", reverse = FALSE, ...) { + + pal <- grattantheme::grattan_palette_set[[palette]] + + if (reverse) pal <- rev(pal) + + grDevices::colorRampPalette(pal, ...) +} + #' Create a Grattan-appropriate palette for your chart. #' #' @param n Numeric. The number of levels in your colour scale. Minimum value is @@ -38,10 +151,14 @@ #' #' @export -grattan_pal <- function(n = 0, reverse = FALSE, +grattan_pal <- function(n = 0, + reverse = FALSE, faded_level = 0, faded = FALSE) { + lifecycle::deprecate_warn(when = "1.0.0", what = "grattan_pal()", + details = "Please use `make_grattan_pal` or `make_grattan_pal_discrete` instead.") + if (isTRUE(faded) & faded_level == 0) { faded_level <- 4 warning("faded argument is deprecated. Please use faded_level instead.", @@ -75,79 +192,81 @@ get_palette <- function(n, f) { palette <- "orange" } else if (n == "2a") { palette <- c("orange", - "darkorange") + "darkorange") } else if (n == 2) { palette <- c("orange", - "red") + "red") } else if (n == 3) { palette <- c("yellow", - "orange", - "red") + "orange", + "red") } else if (n == 4) { palette <- c("yellow", - "orange", - "darkorange", - "red") + "orange", + "darkorange", + "red") } else if (n == 5) { palette <- c("yellow", - "orange", - "darkorange", - "red", - "darkred") + "orange", + "darkorange", + "red", + "darkred") } else if (n == 6) { palette <- c("lightyellow", - "yellow", - "orange", - "darkorange", - "red", - "darkred") + "yellow", + "orange", + "darkorange", + "red", + "darkred") } else if (n == 7) { palette <- c("lightyellow", - "yellow", - "lightorange", - "darkorange", - "red", - "darkred", - "blue") + "yellow", + "lightorange", + "darkorange", + "red", + "darkred", + "blue") } else if (n == 8) { palette <- c("lightyellow", - "yellow", - "lightorange", - "darkorange", - "red", - "darkred", - "blue", - "darkblue") + "yellow", + "lightorange", + "darkorange", + "red", + "darkred", + "blue", + "darkblue") } else if (n == 9) { palette <- c("lightyellow", - "yellow", - "lightorange", - "darkorange", - "red", - "darkred", - "blue", - "darkblue", - "lightgrey") + "yellow", + "lightorange", + "darkorange", + "red", + "darkred", + "blue", + "darkblue", + "lightgrey") } else if (n == 10) { palette <- c("lightyellow", - "yellow", - "lightorange", - "darkorange", - "red", - "darkred", - "blue", - "darkblue", - "lightgrey", - "darkgrey") + "yellow", + "lightorange", + "darkorange", + "red", + "darkred", + "blue", + "darkblue", + "lightgrey", + "darkgrey") } if (f == 0) f <- "" palette <- purrr::map_chr( - paste0("grattan_", palette, f), - get - ) + paste0("grattan_", palette, f), + get + ) return(palette) } + + diff --git a/R/grattan_save_pptx.R b/R/grattan_save_pptx.R index b97a100a..34e6ebd4 100644 --- a/R/grattan_save_pptx.R +++ b/R/grattan_save_pptx.R @@ -58,7 +58,6 @@ grattan_save_pptx <- function(p = ggplot2::last_plot(), type <- chart_types$type[!is.na(chart_types$pptx_template)] } - output_dir <- tools::file_path_sans_ext(filename) if (isFALSE(dir.exists(output_dir))) { @@ -74,7 +73,7 @@ grattan_save_pptx <- function(p = ggplot2::last_plot(), # if a single plot, we want to create a list with the plot as the sole element if (inherits(plot, "gg")) { plot <- list(plot) - } else if (class(plot) != "list") { + } else if (!inherits(plot, "list")) { stop("plot must be either a ggplot2 object or a list of ggplot2 objects.") } else { p_is_gg <- purrr::map_lgl(plot, inherits, "gg") @@ -83,23 +82,187 @@ grattan_save_pptx <- function(p = ggplot2::last_plot(), } } - walk2(.x = filenames, - .y = type, - .f = create_pptx_shell, - p = plot) + num_slides <- length(plot) - walk2( + purrr::walk2( .x = filenames, .y = type, .f = ~add_graph_to_pptx(filename = .x, type = .y, - p = plot) + p = plot, + num_slides = num_slides) ) ggplot2::set_last_plot(p) invisible(TRUE) } +#' Take a pre-existing PPTX document with n slides and a list of n ggplot2 +#' objects; add one object to each slide using officer +#' +#' @param p a ggplot +#' @param filename filename incl. path to an existing PPTX file +#' @param type a grattantheme chart type with a PPTX template +#' @param num_slides number of slides to make +#' +#' @keywords internal +#' @importFrom officer read_pptx on_slide ph_with ph_location_label +#' @importFrom rvg dml +add_graph_to_pptx <- function(p, + filename, + type, + num_slides) { + + message(glue::glue("Making {type}")) + + # Get path to appropriate PPTX template from `grattantheme` + template_filename <- system.file("extdata", + chart_types_inc_deprecated$pptx_template[chart_types_inc_deprecated$type == type], + package = "grattantheme") + + p <- purrr::map( + .x = p, + .f = wrap_labs, + type = type, + labs_to_wrap = "caption" + ) + + master <- dplyr::if_else(type == "fullslide", "Charts for overheads", "Office Theme") + x <- officer::read_pptx(template_filename) + + for (slide in seq_len(num_slides)) { + notes <- return_script_and_chart_location(filename = filename) + + plot <- p[[slide]] + + x <- x %>% + officer::add_slide(layout="Two Content", master = master) %>% + officer::set_notes(value = notes, officer::notes_location_type(type = "body")) + + replace_null <- function(string) { + ifelse(is.null(string), " ", string) + } + + labs <- extract_labs(plot) + + x <- officer::ph_with(x, + replace_null(labs$title), + location = officer::ph_location_label("Title 1")) + + x <- officer::ph_with(x, + replace_null(labs$subtitle), + location = officer::ph_location_label("Content Placeholder 2")) + + x <- officer::ph_with(x, + replace_null(labs$caption), + location = officer::ph_location_label("Caption Placeholder 1")) + + + plot <- replace_labs(plot) + + + # Add caption back in for non-report-bound chart types + chart_class <- chart_types_inc_deprecated$class[chart_types_inc_deprecated$type == type] + # Is the chart bound for a report? + report_bound <- chart_class == "normal" + + if (!report_bound) { + plot <- replace_labs(plot, list(title = NULL, + subtitle = NULL, + caption = NULL)) + } + + # Define the graph location; if no subtitle exists OR the chart is + # report bound, we want to fill the subtitle space with the graph + if (!is.null(labs$subtitle) | report_bound) { + graph_location <- officer::ph_location_label("Content Placeholder 3") + } else { + slide_summ <- officer::slide_summary(x) + v_offset <- 0.12 + graph_location <- officer::ph_location( + left = slide_summ$offx[slide_summ$ph_label == "Content Placeholder 2"], + top = slide_summ$offy[slide_summ$ph_label == "Content Placeholder 2"] + + v_offset, + width = slide_summ$cx[slide_summ$ph_label == "Content Placeholder 2"], + height = officer::slide_size(x)$height - + slide_summ$offy[slide_summ$ph_label == "Content Placeholder 2"] - + v_offset + ) + + } + + # Add graph as SVG object + x <- officer::ph_with(x, + rvg::dml(ggobj = plot), + location = graph_location) + + if (is.null(labs$subtitle)) { + x <- officer::ph_remove(x, ph_label = "Content Placeholder 2") + + } + } + + print(x, filename) + +} + + +#' Return a charter vector of the filepath of the script and powerpoint location +#' +#' An internal function used in `add_graph_to_pptx` to add the location of the script that +#' made a chart and the location where the chart is saved. +#' +#' @param filename the filename of the powerpoint location +#' +#' @return a character +return_script_and_chart_location <- function(filename) { + if (isTRUE(requireNamespace("rstudioapi")) && + isTRUE(rstudioapi::isAvailable())) { + script_location <- rstudioapi::getActiveDocumentContext()$path + } else { + script_location <- "" + } + + graph_location <- normalizePath(filename, mustWork = FALSE) + + script_location <- gsub("^.*(?=(Dropbox))", "", script_location, perl = TRUE) + graph_location <- gsub("^.*(?=(Dropbox))", "", graph_location, perl = TRUE) + + script_loc_note <- ifelse(script_location == "", + "", + paste0("R script location: ", + script_location)) + + graph_loc_note <- paste0("Powerpoint file location: ", + graph_location) + + final_note <- paste0(script_loc_note, "\n", graph_loc_note) + + return(final_note) +} + +#' Check that pandoc is available and is an appropriate version +#' @keywords internal +pandoc_test <- function() { + + if (!rmarkdown::pandoc_available()) { + stop("To use this function, you must install 'pandoc' on your system", + " from pandoc.org. See the grattantheme administrators", + " if you need help.") + } + + if (rmarkdown::pandoc_version() < 2.1) { + stop("The version of 'pandoc' on your system is too old to use this", + " function. Install a newer version from pandoc.org.", + " See the grattantheme administrators if you need help.") + } + + invisible(TRUE) + +} + + +### deprecated 1.0.0------------------ #' Create a Powerpoint document containing no content other than the #' template + slide-specific speaker notes (extracted from a ggplot2 object) @@ -111,6 +274,10 @@ grattan_save_pptx <- function(p = ggplot2::last_plot(), create_pptx_shell <- function(p, filename, type) { + + lifecycle::deprecate_stop(when = "1.0.0", + what = "create_pptx_shell()", + details = "We no longer make a powerpoint shell in markdown, as officer has functionality to edit the notes directly.") pandoc_test() backticks <- paste0((rep("\x60", 3)), collapse = "") @@ -172,6 +339,9 @@ create_pptx_shell <- function(p, #' @importFrom rstudioapi getActiveDocumentContext #' @keywords internal create_slide_shell <- function(p, filename) { + lifecycle::deprecate_stop(when = "1.0.0", + what = "create_slide_shell()", + details = "We no longer make a powerpoint shell in markdown, as officer has functionality to edit the notes directly.") if (isTRUE(requireNamespace("rstudioapi")) && isTRUE(rstudioapi::isAvailable())) { @@ -221,133 +391,3 @@ create_slide_shell <- function(p, filename) { plot_area } -#' Check that pandoc is available and is an appropriate version -#' @keywords internal -pandoc_test <- function() { - - if (!rmarkdown::pandoc_available()) { - stop("To use this function, you must install 'pandoc' on your system", - " from pandoc.org. See the grattantheme administrators", - " if you need help.") - } - - if (rmarkdown::pandoc_version() < 2.1) { - stop("The version of 'pandoc' on your system is too old to use this", - " function. Install a newer version from pandoc.org.", - " See the grattantheme administrators if you need help.") - } - - invisible(TRUE) - -} - -#' Take a pre-existing PPTX document with n slides and a list of n ggplot2 -#' objects; add one object to each slide using officer -#' @param p list of plot(s) -#' @param filename filename incl. path to an existing PPTX file -#' @param type a grattantheme chart type with a PPTX template -#' @keywords internal -#' @importFrom officer read_pptx on_slide ph_with ph_location_label -#' @importFrom rvg dml -add_graph_to_pptx <- function(p, - filename, - type) { - - p <- purrr::map( - .x = p, - .f = wrap_labs, - type = type, - labs_to_wrap = "caption" - ) - - x <- read_pptx(filename) - num_slides <- length(x) - - if (length(p) != num_slides) { - stop("Number of slides in shell must match number of plots in list") - } - - for (slide in seq_len(num_slides)) { - - plot <- p[[slide]] - - x <- on_slide(x, index = slide) - - replace_null <- function(string) { - ifelse(is.null(string), " ", string) - } - - labs <- extract_labs(plot) - - x <- ph_with(x, - replace_null(labs$title), - location = ph_location_label("Title 1")) - - x <- ph_with(x, - replace_null(labs$subtitle), - location = ph_location_label("Content Placeholder 2")) - - - plot <- replace_labs(plot) - - - # Add caption back in for non-report-bound chart types - chart_class <- chart_types_inc_deprecated$class[chart_types_inc_deprecated$type == type] - # Is the chart bound for a report? - report_bound <- chart_class == "normal" - - if (!report_bound) { - plot <- replace_labs(plot, list(title = NULL, - subtitle = NULL, - caption = labs$caption)) - } - - if (isTRUE(gdtools::font_family_exists("Helvetica"))) { - sans_font <- "Helvetica" - } else if (isTRUE(gdtools::font_family_exists("Arial"))) { - sans_font <- "Arial" - } else { - if (gdtools::match_family("sans") == "DejaVu Sans") { - sans_font <- "Arial" - } else { - sans_font <- gdtools::match_family("sans") - } - } - - # Define the graph location; if no subtitle exists OR the chart is - # report bound, we want to fill the subtitle space with the graph - if (!is.null(labs$subtitle) | report_bound) { - graph_location <- ph_location_label("Content Placeholder 3") - } else { - slide_summ <- officer::slide_summary(x) - v_offset <- 0.12 - graph_location <- officer::ph_location( - left = slide_summ$offx[slide_summ$ph_label == "Content Placeholder 2"], - top = slide_summ$offy[slide_summ$ph_label == "Content Placeholder 2"] + - v_offset, - width = slide_summ$cx[slide_summ$ph_label == "Content Placeholder 2"], - height = officer::slide_size(x)$height - - slide_summ$offy[slide_summ$ph_label == "Content Placeholder 2"] - - v_offset - ) - - } - - # Add graph as SVG object - x <- ph_with(x, - rvg::dml(ggobj = plot, - fonts = list(sans = sans_font, - `DejaVu Sans` = sans_font, - Arial = sans_font, - Helvetica = sans_font)), - location = graph_location) - - if (is.null(labs$subtitle)) { - x <- officer::ph_remove(x, ph_label = "Content Placeholder 2") - - } - } - - print(x, filename) - -} diff --git a/R/grattan_scales.R b/R/grattan_scales.R index 2ea45f44..7a56f1c0 100644 --- a/R/grattan_scales.R +++ b/R/grattan_scales.R @@ -1,3 +1,74 @@ +#' Scale constructor for grattan colours +#' +#' If you get an error about not enough colours, try a different palette (such +#' as \code{graph}) or set \code{discrete = FALSE}. If you are plotting discrete colours +#' and need more than 10 colours, then you will have to make your own palette using +#' \code{\link{make_grattan_pal}}. +#' +#' @param palette Character name of palette in \code{grattan_palettes} +#' @param discrete Boolean indicating whether colour aesthetic is discrete or +#' not +#' @param reverse Boolean indicating whether the palette should be reversed +#' @param ... Additional arguments passed to \code{\link{discrete_scale}} or +#' \code{\link{scale_color_gradientn}}, used respectively when discrete is +#' TRUE or FALSE +#' +#' @describeIn scale_colour_grattan For colour scales +#' +#' @export +scale_colour_grattan <- function( + palette = NULL, + discrete = FALSE, + reverse = FALSE, + ... +) { + if (is.null(palette) && discrete) { + palette <- "graph" + } + + if (is.null(palette) && !discrete) { + palette <- "sequential" + } + + pal <- make_grattan_pal(palette = palette, reverse = reverse) + + if (discrete) { + ggplot2::discrete_scale("colour", paste0("grattan_", palette), palette = make_grattan_pal_discrete, ...) + } else { + ggplot2::scale_color_gradientn(colours = pal(256L), ...) + } +} + + +#' @describeIn scale_colour_grattan For fill scales +#' +#' @export +#' +scale_fill_grattan <- function( + palette = NULL, + discrete = FALSE, + reverse = FALSE, + ... +) { + if (is.null(palette) && discrete) { + palette <- "graph" + } + + if (is.null(palette) && !discrete) { + palette <- "sequential" + } + + pal <- make_grattan_pal(palette = palette, reverse = reverse) + + if (discrete) { + ggplot2::discrete_scale("fill", paste0("grattan_", palette), palette = make_grattan_pal_discrete, ...) + } else { + ggplot2::scale_fill_gradientn(colours = pal(256L), ...) + } +} + +### Deprecated ### + #' Convenient functions to set Grattan-appropriate palettes #' #' @param n Numeric. The number of levels in your colour scale. Minimum value is @@ -55,19 +126,23 @@ grattan_colour_manual <- function(n = 0, faded_level = 0, faded = FALSE, palette = "full", ...) { + + lifecycle::deprecate_warn(when = "1.0.0", what = "grattan_colour_manual()", + details = "`grattan_colour_manual` has been deprecated which means it will no longer be maintained or updated. Please use `scale_colour_grattan` instead.") + if (discrete) { return( - ggplot2::scale_colour_manual(..., - values = grattantheme::grattan_pal(n = n, - reverse = reverse, - faded_level = faded_level, - faded = faded)) + ggplot2::scale_colour_manual(..., + values = grattantheme::grattan_pal(n = n, + reverse = reverse, + faded_level = faded_level, + faded = faded)) ) } if (!discrete) { - pal <- grattan_palette(palette = palette, reverse = reverse) - return(ggplot2::scale_color_gradientn(colours = pal(256), ...)) + pal <- make_grattan_pal(palette = palette, reverse = reverse) + return(ggplot2::scale_color_gradientn(colours = pal(256), ...)) } @@ -77,11 +152,15 @@ grattan_colour_manual <- function(n = 0, #' @import ggplot2 #' @export -grattan_fill_manual <- function(n = 0, reverse = FALSE, +grattan_fill_manual <- function(n = 0, + reverse = FALSE, discrete = TRUE, faded_level = 0, faded = FALSE, palette = "full", ...) { + lifecycle::deprecate_warn(when = "1.0.0", what = "grattan_fill_manual()", + details = "`grattan_colour_manual` has been deprecated which means it will no longer be maintained or updated. Please use `scale_fill_grattan` instead.") + if (discrete) { return( ggplot2::scale_fill_manual(..., @@ -93,19 +172,8 @@ grattan_fill_manual <- function(n = 0, reverse = FALSE, } if (!discrete) { - pal <- grattan_palette(palette = palette, reverse = reverse) + pal <- make_grattan_pal(palette = palette, reverse = reverse) return(ggplot2::scale_fill_gradientn(colours = pal(256), ...)) } } - - -# Generates a full palette -grattan_palette <- function(palette = "full", reverse = FALSE, ...) { - - pal <- grattantheme::grattan_palette_set[[palette]] - - if (reverse) pal <- rev(pal) - - grDevices::colorRampPalette(pal, ...) -} diff --git a/R/make_slide.R b/R/make_slide.R deleted file mode 100644 index 9ac97765..00000000 --- a/R/make_slide.R +++ /dev/null @@ -1,111 +0,0 @@ -#' Create Powerpoint slides (deprecated) -#' -#' @description -#' -#' These functions have been deprecated (removed) from the grattantheme -#' package. Use the new function `grattan_save_pptx()` instead. -#' -#' @param graph The graph you want to include on your slide. Defaults to the -#' last plot (ggplot2::last_plot()) -#' @param filename The filename for your Powerpoint slide. -#' @param path Path to the directory you wish to save your slide in. Defaults to -#' your working directory. -#' @param type The type of Powerpoint slide to create; either "16:9" (the -#' default, for a 16:9 orientation slide), or "4:3". -#' @importFrom rmarkdown render -#' @importFrom knitr opts_chunk -#' @importFrom tools file_path_sans_ext -#' @importFrom rmarkdown pandoc_version pandoc_available -#' @importFrom rstudioapi getActiveDocumentContext -#' -#' @examples -#' -#' # To take a single ggplot2 graph and turn it into a slide: -#' # First, create your ggplot2 object. Include your subtitle, -#' # title, and caption with +labs() -#' -#'library(ggplot2) -#'library(grattantheme) -#' -#'ggplot(mtcars, aes(x = mpg, y = hp)) + -#' geom_point() + -#' theme_grattan() + -#' labs(title = "Long title goes here with a bunch of text lorem ipsum -#' Grattan blah blah sensible orange", -#' subtitle = "Subtitle", -#' caption = "Source: blah") -#' -#' # Now, create a Powerpoint slide with your graph in your working directory. -#' # By default, make_slide() will use the last plot you generated; -#' # you can specify a different object to use with the `graph` argument. -#' -#' \dontrun{make_slide(filename = "test.pptx")} -#' -#' @export - - -make_slide <- function(graph = last_plot(), - filename = NULL, - path = ".", - type = "16:9") { - - .Deprecated("grattan_save_pptx()", - msg = "make_presentation() is deprecated Use `grattan_save_pptx()`.") - -} - -#' @param graphs A list of ggplot2 objects -#' @param title Optional. The title of your presentation, if you want a title -#' slide. -#' @param subtitle Optional. The subtitle of your presentation, if you want a -#' title slide. -#' @rdname make_slide -#' @name make_presentation -#' @examples -#' -#' # To take multiple ggplot2 graphs and turn them into slides in a single -#' # presentation: -#' # First, create multiple ggplot2 objects. Include your subtitle, title, -#' # and caption with +labs() -#' -#'library(ggplot2) -#'library(grattantheme) -#' -#'graph1 <- ggplot(mtcars, aes(x = mpg, y = hp)) + -#' geom_point() + -#' theme_grattan() + -#' labs(title = "Title goes here with a bunch of text lorem ipsum", -#' subtitle = "Subtitle", -#' caption = "Source: blah") -#' -#'graph2 <- ggplot(mtcars, aes(x = mpg, y = hp)) + -#' geom_col() + -#' theme_grattan() + -#' labs(title = "This is another graph to go on the second slide", -#' subtitle = "Units go here", -#' caption = "Source: mtcars.") -#' -#'# Now combine your two graphs together in a list: -#' -#'graphs <- list(graph1, graph2) -#' -#' # Now, create a Powerpoint presentation with one -#' # slide per graph in your list: -#' -#' \dontrun{make_presentation(graphs, filename = "test.pptx")} -#' -#' @export - - -make_presentation <- function(graphs, - filename = NULL, - path = ".", - type = "16:9", - title = "Title", - subtitle = "Subtitle") { - - .Deprecated("grattan_save_pptx()", - msg = "make_presentation() is deprecated. Use `grattan_save_pptx()`.") - -} - diff --git a/R/sysdata.rda b/R/sysdata.rda index cb196233..c36ad9d7 100644 Binary files a/R/sysdata.rda and b/R/sysdata.rda differ diff --git a/R/theme_grattan_base.R b/R/theme_grattan_base.R index 9f36f603..858765e8 100644 --- a/R/theme_grattan_base.R +++ b/R/theme_grattan_base.R @@ -14,14 +14,14 @@ theme_grattan_base <- function(base_size = 18, theme( line = element_line( colour = grattantheme::grattan_gridlinegrey, - size = base_line_size, + linewidth = base_line_size, linetype = 1, lineend = "butt" ), rect = element_rect( fill = background, colour = grattantheme::grattan_gridlinegrey, - size = base_rect_size, + linewidth = base_rect_size, linetype = 0 ), text = element_text( @@ -37,7 +37,7 @@ theme_grattan_base <- function(base_size = 18, size = base_size ), axis.line = element_line( - size = points_to_mm(1), + linewidth = points_to_mm(1), colour = "black" ), axis.line.x = NULL, @@ -104,7 +104,7 @@ theme_grattan_base <- function(base_size = 18, panel.background = element_rect(colour = NA), panel.border = element_blank(), panel.grid = element_line(colour = grattantheme::grattan_gridlinegrey, - size = points_to_mm(0.5)), + linewidth = points_to_mm(0.5)), panel.grid.minor = element_blank(), panel.spacing = unit(1, "lines"), @@ -171,7 +171,7 @@ theme_grattan_base <- function(base_size = 18, ret <- ret %+replace% theme(panel.border = element_rect( linetype = 1, - size = points_to_mm(2), + linewidth = points_to_mm(2), colour = "black", fill = NA )) diff --git a/R/z_default_aesthetics.R b/R/z_default_aesthetics.R new file mode 100644 index 00000000..450d36ce --- /dev/null +++ b/R/z_default_aesthetics.R @@ -0,0 +1,202 @@ +#' A vector of geoms +#' +#' A vector of geoms exported from `{ggplot2}` and extension packages. This +#' vector is iterated on to set the default aesthetics for each geom, allowing +#' the grattan colours to be plotted automatically. +#' +#' @format A vector +"all_geoms" + + +#' A list of plot options reflecting the Grattan brand +#' +plot_opts_grattan <- list( + ggplot2.continuous.colour = scale_colour_grattan, + ggplot2.continuous.fill = scale_fill_grattan, + ggplot2.discrete.colour = function() scale_colour_grattan(discrete = TRUE), + ggplot2.discrete.fill = function() scale_fill_grattan(discrete = TRUE) +) + +#' The vanilla plotting options +#' +#' These options restore the vanilla ggplot2 colours options for the R session. +#' +plot_opts_vanilla <- list( + ggplot2.continuous.colour = NULL, + ggplot2.continuous.fill = NULL, + ggplot2.discrete.colour = NULL, + ggplot2.discrete.fill = NULL +) + + + +#' Set default geom aesthetics +#' +#' All arguments are passed to \code{ggplot2::update_geom_defaults}, but this +#' function adds a \code{NULL} check. +#' +#' @param geom Name of geom/stat to modify (like "point" or "bin"), or a +#' Geom/Stat object (like GeomPoint or StatBin). +#' @inheritParams ggplot2::update_geom_defaults +#' +.set_geom_aesthetics <- function(geom, new) { + if (is.null(new)) { + return(NULL) + } else { + ggplot2::update_geom_defaults( + geom = geom, + new = new + ) + } +} + +.safe_set_geom_aesthetics <- purrr::safely(.set_geom_aesthetics) # nolint + +#' Prepare `{ggplot2}` geom_ defaults +#' +#' ggplot2 geoms have default aesthetics which can be changed for each +#' session. This function is a generalised way to set geom defaults. It only +#' changes settings where the default is not NA; no need for \code{geom_point} +#' to have a default font family. +#' +#' This is used inside `.set_grattab_aesthetics()` +#' +#' @param geom (character) the geom to change (e.g. \code{point} or +#' \code{line}) +#' @param aes (character) the aesthetic to change (e.g. \code{colour} or +#' \code{alpha}) +#' @param setting (various) what to set the aesthetic (e.g. a colour or a +#' number) +#' +#' @return the default aesthetic ready to be set +.prep_aes <- function(geom, aes, setting) { + # Check if the geom inherits from elsewhere + if (is.null(geom)) { + return(NULL) + } + + # Check if the setting exists for this geom + if (is.null(geom[[aes]])) { + return(geom) + } + + # Change the setting only if it's not NA + if (!is.na(geom[[aes]])) { + geom[[aes]] <- setting + } + + return(geom) +} + + +#' Set the default ggplot2 aesthetics to grattan branding +#' +#' A wrapper for a bunch of other functions to set ggplot2 default aesthetics. +.set_grattan_aesthetics <- function() { + # Import an unexported function from {ggplot2} used to inspect a ggproto + # object, the object class that underpins all geoms + check_subclass <- utils::getFromNamespace("check_subclass", "ggplot2") + + current_aesthetics <- grattantheme::all_geoms %>% + # Get the details for geoms currently available in the namespace + # We use safely() because the geom's package must be libraried for it to + # be accessible (otherwise it errors), and `all_geoms` was build with + # many ggplot extension packages libraried + purrr::map( + purrr::safely(check_subclass), + "Geom", + env = parent.frame() + ) %>% + purrr::map( + purrr::pluck, + "result" + ) %>% + purrr::map( + purrr::pluck, + "default_aes" + ) %>% + purrr::set_names(grattantheme::all_geoms) + + # Overwrite elements of the current_aesthetics to use theme settings + # Just font family to inter (if available) and col/fill to QND blue stone + grattan_aesthetics <- current_aesthetics %>% + # purrr::map( + # # We use .prep_aes() (defined above) to handle NULLS and NAs + # .prep_aes, + # aes = "family", + # setting = qnd_font() + # ) %>% + purrr::map( + .prep_aes, + aes = "colour", + setting <- grattan_orange + ) %>% + purrr::map( + .prep_aes, + aes = "fill", + setting <- grattan_orange + ) + + # nolint start + purrr::iwalk( + grattan_aesthetics, + ~ .safe_set_geom_aesthetics( + geom = .y, + new = .x + ) + ) + # nolint end + + # Explicit setting of geom_sf defaults + ggplot2::update_geom_defaults( + geom = "sf", + new = list( + col = grattan_orange, + fill = grattan_orange + ) + ) +} + +#' Set \code{ggplot2} default aesthetics +#' +#' Sets global options for \code{ggplot2}. If \code{type = "grattan"}, grattan brand +#' elements (colours and fonts) will be used by default in ggplot. To restore +#' the defaults use \code{type = "vanilla"}. +#' +#' @param type (character) Which aesthetics to use? One of "grattan" or "vanilla". +#' +#' @export +#' @examples +#' \dontrun{ +#' set_aesthetics(type = "vanilla") +#' } +set_aesthetics <- function(type) { + nice_type <- ifelse(type == "grattan", "grattan", type) + + the_message <- paste( + "ggplot2 will use", + nice_type, + "aesthetics (in the absence of a scale_colour etc function).", + "\nRun `set_aesthetics()` again after any more `library()` calls to {ggplot2} extension packages to set the aesthetics of geoms from those packages." + ) + + + if (type == "grattan") { + options(plot_opts_grattan) + .set_grattan_aesthetics() + message(the_message) + } else if (type == "vanilla") { + # Set default aesthetics + options(plot_opts_vanilla) + purrr::iwalk( + vanilla_geom_aesthetics, + ~ .safe_set_geom_aesthetics( + geom = .y, + new = .x + ) + ) + message(the_message) + } else { + message("Not a valid type. Nothing changed.") + } +} diff --git a/R/zzz.R b/R/zzz.R new file mode 100644 index 00000000..c6a77234 --- /dev/null +++ b/R/zzz.R @@ -0,0 +1,15 @@ +.onLoad <- function(libname, pkgname) { + + cowsay::say(praise::praise(), sample(names(cowsay::animals)[!names(cowsay::animals) %in% c("anxiouscat", + "fish", + "grumpycat", + "longcat", + "longtailcat", + "mushroom", + "shortcat", + "signbunny", + "stretchycat")], 1) ) + register_palette() + set_aesthetics("grattan") + +} diff --git a/README.Rmd b/README.Rmd index 57866247..0843deb5 100644 --- a/README.Rmd +++ b/README.Rmd @@ -64,7 +64,7 @@ library(grattantheme) make_col_tibble <- function(n) { - tibble(col = grattan_pal(n), + tibble(col = make_grattan_pal_discrete(n), order = c(1:n), n = n) @@ -81,7 +81,7 @@ col_plot <- grattan_colours %>% ggplot(aes(x = reorder(n_desc, -n), y = order, fill = col)) + - geom_tile(col = "white", size = 1) + + geom_tile(col = "white", linewidth = 1) + scale_fill_manual(values = levels(grattan_colours$col)) + coord_flip(expand = FALSE, ylim = c(0, 13)) + theme_grattan() + diff --git a/data-raw/all_geoms.R b/data-raw/all_geoms.R new file mode 100644 index 00000000..a9df8b1e --- /dev/null +++ b/data-raw/all_geoms.R @@ -0,0 +1,33 @@ +## code to prepare `all_geoms` dataset goes here + +# This script loads a bunch of supporting packages and extracts their geoms. +# These geom names are then used to set the default aesthetics. + +geom_packs <- c( + "ggplot2", + "ggbeeswarm", + "ggridges", + "geomtextpath", + "ggtext", + "ggspatial", + "ggrepel", + "ggExtra", + "ggforce", + "ggh4x" +) + +# Not sure yet if adding packages to "suggests" is useful, don't do it for now +# purrr::walk(geom_packs[-1L], use_package, type = "Suggests") # nolint + + +get_geoms <- function(pack) { + ls(getNamespace(pack), pattern = "^geom_") +} + +all_geoms <- purrr::map(geom_packs, get_geoms) |> + purrr::flatten_chr() |> + stringr::str_remove("^geom_") |> + sort() + + +usethis::use_data(all_geoms, overwrite = TRUE) diff --git a/data-raw/create sysdata.R b/data-raw/create sysdata.R index d55bcedf..d452b26f 100644 --- a/data-raw/create sysdata.R +++ b/data-raw/create sysdata.R @@ -17,6 +17,7 @@ chart_types <- tibble::tribble( "fullslide_43", "active", 25.40, 19.05, 140, 55, 70, "fullslide", "template_43.pptx", "blog", "active", 25.40, 19.05, 155, 62, 85, "fullslide", "template_blog.pptx", "a4", "active", 21.00, 29.70, 114, 66, 62, "fullslide", NA_character_, + "fullslide_2022", "active", 31.70, 19.05, 175, 55, 95, "fullslide", "template_2022.pptx", "fullslide_44", "deprecated", 25.40, 25.40, 140, 55, 95, "fullslide", NA_character_, "blog_half", "deprecated", 25.4/2, 19.05, 155, 62, 85, "fullslide", "template_blog_half.pptx", @@ -27,16 +28,16 @@ chart_types <- tibble::tribble( blog_border <- 0.15 chart_types <- chart_types %>% - mutate(top_border = case_when(class == "normal" ~ 0, + dplyr::mutate(top_border = dplyr::case_when(class == "normal" ~ 0, grepl("blog", type) ~ blog_border, type == "fullslide_old169" ~ 0.5, TRUE ~ 0.7), - bottom_border = case_when(class == "normal" ~ 0, + bottom_border = dplyr::case_when(class == "normal" ~ 0, grepl("blog", type) ~ 0.05, type %in% c("fullslide", "fullslide_44") ~ 0.24, TRUE ~ 0.05), - left_border = case_when(class == "normal" ~ 0, + left_border = dplyr::case_when(class == "normal" ~ 0, type %in% c("fullslide_43", "fullslide_44") ~ (width - 22.16) / 2, type == "fullslide" ~ (width - 30) / 2, @@ -54,7 +55,7 @@ all_chart_types_inc_deprecated <- chart_types$type fullslide_chart_types <- chart_types$type[chart_types$class == "fullslide" & chart_types$status == "active"] fullslide_chart_types_inc_deprecated <- chart_types$type[chart_types$class == "fullslide"] -use_data(logogrob, +usethis::use_data(logogrob, chart_types, chart_types_inc_deprecated, all_chart_types, @@ -65,6 +66,6 @@ use_data(logogrob, overwrite = TRUE) chart_types_ext <- chart_types -use_data(chart_types_ext, +usethis::use_data(chart_types_ext, internal = FALSE, overwrite = TRUE) diff --git a/data-raw/create_grattan_colours.R b/data-raw/create_grattan_colours.R deleted file mode 100644 index e214af57..00000000 --- a/data-raw/create_grattan_colours.R +++ /dev/null @@ -1,329 +0,0 @@ -# Define grattan colours ======================================================= - -# Yellow light ---- -grattan_lightyellow <- "#FFE07F" -usethis::use_data(grattan_lightyellow, overwrite = TRUE) -grattan_lightyellow1 <- "#FFE38C" -usethis::use_data(grattan_lightyellow1, overwrite = TRUE) -grattan_lightyellow2 <- "#FFE699" -usethis::use_data(grattan_lightyellow2, overwrite = TRUE) -grattan_lightyellow3 <- "#FFE9A5" -usethis::use_data(grattan_lightyellow3, overwrite = TRUE) -grattan_lightyellow4 <- "#FFECB2" -usethis::use_data(grattan_lightyellow4, overwrite = TRUE) -grattan_lightyellow5 <- "#FFF0BF" -usethis::use_data(grattan_lightyellow5, overwrite = TRUE) -grattan_lightyellow6 <- "#FFF3CC" -usethis::use_data(grattan_lightyellow6, overwrite = TRUE) -grattan_lightyellow7 <- "#FFF6D9" -usethis::use_data(grattan_lightyellow7, overwrite = TRUE) -grattan_lightyellow8 <- "#FFF9E5" -usethis::use_data(grattan_lightyellow8, overwrite = TRUE) - - -# dark -grattan_darkyellow <- "#FFC35A" # grattan_yellow -usethis::use_data(grattan_darkyellow, overwrite = TRUE) -grattan_darkyellow1 <- "#FFC96B" -usethis::use_data(grattan_darkyellow1, overwrite = TRUE) -grattan_darkyellow2 <- "#FFCF7B" -usethis::use_data(grattan_darkyellow2, overwrite = TRUE) -grattan_darkyellow3 <- "#FFD58C" -usethis::use_data(grattan_darkyellow3, overwrite = TRUE) -grattan_darkyellow4 <- "#FFDB9C" -usethis::use_data(grattan_darkyellow4, overwrite = TRUE) -grattan_darkyellow5 <- "#FFE1AD" -usethis::use_data(grattan_darkyellow5, overwrite = TRUE) -grattan_darkyellow6 <- "#FFE7BD" -usethis::use_data(grattan_darkyellow6, overwrite = TRUE) -grattan_darkyellow7 <- "#FFEDCE" -usethis::use_data(grattan_darkyellow7, overwrite = TRUE) -grattan_darkyellow8 <- "#FFF3DE" -usethis::use_data(grattan_darkyellow8, overwrite = TRUE) - -grattan_yellow <- grattan_darkyellow -usethis::use_data(grattan_yellow, overwrite = TRUE) -grattan_yellow1 <- grattan_darkyellow1 -usethis::use_data(grattan_yellow1, overwrite = TRUE) -grattan_yellow2 <- grattan_darkyellow2 -usethis::use_data(grattan_yellow2, overwrite = TRUE) -grattan_yellow3 <- grattan_darkyellow3 -usethis::use_data(grattan_yellow3, overwrite = TRUE) -grattan_yellow4 <- grattan_darkyellow4 -usethis::use_data(grattan_yellow4, overwrite = TRUE) -grattan_yellow5 <- grattan_darkyellow5 -usethis::use_data(grattan_yellow5, overwrite = TRUE) -grattan_yellow6 <- grattan_darkyellow6 -usethis::use_data(grattan_yellow6, overwrite = TRUE) -grattan_yellow7 <- grattan_darkyellow7 -usethis::use_data(grattan_yellow7, overwrite = TRUE) -grattan_yellow8 <- grattan_darkyellow8 -usethis::use_data(grattan_yellow8, overwrite = TRUE) - - - -# Orange light ---------- -grattan_lightorange <- "#F68B33" # grattan_light_orange -usethis::use_data(grattan_lightorange, overwrite = TRUE) -grattan_lightorange1 <- "#F79747" -usethis::use_data(grattan_lightorange1, overwrite = TRUE) -grattan_lightorange2 <- "#F8A25C" -usethis::use_data(grattan_lightorange2, overwrite = TRUE) -grattan_lightorange3 <- "#F9AE70" -usethis::use_data(grattan_lightorange3, overwrite = TRUE) -grattan_lightorange4 <- "#FAB985" -usethis::use_data(grattan_lightorange4, overwrite = TRUE) -grattan_lightorange5 <- "#FBC599" -usethis::use_data(grattan_lightorange5, overwrite = TRUE) -grattan_lightorange6 <- "#FBD1AD" -usethis::use_data(grattan_lightorange6, overwrite = TRUE) -grattan_lightorange7 <- "#FCDCC2" -usethis::use_data(grattan_lightorange7, overwrite = TRUE) -grattan_lightorange8 <- "#FDE8D6" -usethis::use_data(grattan_lightorange8, overwrite = TRUE) - -grattan_orange <- grattan_lightorange -usethis::use_data(grattan_orange, overwrite = TRUE) -grattan_orange1 <- grattan_lightorange1 -usethis::use_data(grattan_orange1, overwrite = TRUE) -grattan_orange2 <- grattan_lightorange2 -usethis::use_data(grattan_orange2, overwrite = TRUE) -grattan_orange3 <- grattan_lightorange3 -usethis::use_data(grattan_orange3, overwrite = TRUE) -grattan_orange4 <- grattan_lightorange4 -usethis::use_data(grattan_orange4, overwrite = TRUE) -grattan_orange5 <- grattan_lightorange5 -usethis::use_data(grattan_orange5, overwrite = TRUE) -grattan_orange6 <- grattan_lightorange6 -usethis::use_data(grattan_orange6, overwrite = TRUE) -grattan_orange7 <- grattan_lightorange7 -usethis::use_data(grattan_orange7, overwrite = TRUE) -grattan_orange8 <- grattan_lightorange8 -usethis::use_data(grattan_orange8, overwrite = TRUE) - -# dark: -grattan_darkorange <- "#D4582A" -usethis::use_data(grattan_darkorange, overwrite = TRUE) -grattan_darkorange1 <- "#D8693F" -usethis::use_data(grattan_darkorange1, overwrite = TRUE) -grattan_darkorange2 <- "#DD7955" -usethis::use_data(grattan_darkorange2, overwrite = TRUE) -grattan_darkorange3 <- "#E18A6A" -usethis::use_data(grattan_darkorange3, overwrite = TRUE) -grattan_darkorange4 <- "#E59B7F" -usethis::use_data(grattan_darkorange4, overwrite = TRUE) -grattan_darkorange5 <- "#EAAC95" -usethis::use_data(grattan_darkorange5, overwrite = TRUE) -grattan_darkorange6 <- "#EEBCAA" -usethis::use_data(grattan_darkorange6, overwrite = TRUE) -grattan_darkorange7 <- "#F2CDBF" -usethis::use_data(grattan_darkorange7, overwrite = TRUE) -grattan_darkorange8 <- "#F6DED4" -usethis::use_data(grattan_darkorange8, overwrite = TRUE) - - -# Red -------------- -# light: -grattan_lightred <- "#A02226" -usethis::use_data(grattan_lightred, overwrite = TRUE) -grattan_lightred1 <- "#AA383C" -usethis::use_data(grattan_lightred1, overwrite = TRUE) -grattan_lightred2 <- "#B34E51" -usethis::use_data(grattan_lightred2, overwrite = TRUE) -grattan_lightred3 <- "#BD6467" -usethis::use_data(grattan_lightred3, overwrite = TRUE) -grattan_lightred4 <- "#C67A7D" -usethis::use_data(grattan_lightred4, overwrite = TRUE) -grattan_lightred5 <- "#D09193" -usethis::use_data(grattan_lightred5, overwrite = TRUE) -grattan_lightred6 <- "#D9A7A8" -usethis::use_data(grattan_lightred6, overwrite = TRUE) -grattan_lightred7 <- "#E3BDBE" -usethis::use_data(grattan_lightred7, overwrite = TRUE) -grattan_lightred8 <- "#ECD3D4" -usethis::use_data(grattan_lightred8, overwrite = TRUE) - -grattan_red <- grattan_lightred -usethis::use_data(grattan_red, overwrite = TRUE) -grattan_red1 <- grattan_lightred1 -usethis::use_data(grattan_red1, overwrite = TRUE) -grattan_red2 <- grattan_lightred2 -usethis::use_data(grattan_red2, overwrite = TRUE) -grattan_red3 <- grattan_lightred3 -usethis::use_data(grattan_red3, overwrite = TRUE) -grattan_red4 <- grattan_lightred4 -usethis::use_data(grattan_red4, overwrite = TRUE) -grattan_red5 <- grattan_lightred5 -usethis::use_data(grattan_red5, overwrite = TRUE) -grattan_red6 <- grattan_lightred6 -usethis::use_data(grattan_red6, overwrite = TRUE) -grattan_red7 <- grattan_lightred7 -usethis::use_data(grattan_red7, overwrite = TRUE) -grattan_red8 <- grattan_lightred8 -usethis::use_data(grattan_red8, overwrite = TRUE) - -# dark: -grattan_darkred <- "#621214" -usethis::use_data(grattan_darkred, overwrite = TRUE) -grattan_darkred1 <- "#722A2C" -usethis::use_data(grattan_darkred1, overwrite = TRUE) -grattan_darkred2 <- "#814143" -usethis::use_data(grattan_darkred2, overwrite = TRUE) -grattan_darkred3 <- "#91595B" -usethis::use_data(grattan_darkred3, overwrite = TRUE) -grattan_darkred4 <- "#A17172" -usethis::use_data(grattan_darkred4, overwrite = TRUE) -grattan_darkred5 <- "#B1898A" -usethis::use_data(grattan_darkred5, overwrite = TRUE) -grattan_darkred6 <- "#C0A0A1" -usethis::use_data(grattan_darkred6, overwrite = TRUE) -grattan_darkred7 <- "#D0B8B9" -usethis::use_data(grattan_darkred7, overwrite = TRUE) -grattan_darkred8 <- "#E0D0D0" -usethis::use_data(grattan_darkred8, overwrite = TRUE) - - -# Blue ------------------------------------------------------------------------- -# light: -grattan_lightblue <- "#A3C7DF" -usethis::use_data(grattan_lightblue, overwrite = TRUE) -grattan_lightblue1 <- "#ACCDE2" -usethis::use_data(grattan_lightblue1, overwrite = TRUE) -grattan_lightblue2 <- "#B5D2E5" -usethis::use_data(grattan_lightblue2, overwrite = TRUE) -grattan_lightblue3 <- "#BFD8E9" -usethis::use_data(grattan_lightblue3, overwrite = TRUE) -grattan_lightblue4 <- "#C8DDEC" -usethis::use_data(grattan_lightblue4, overwrite = TRUE) -grattan_lightblue5 <- "#D1E3EF" -usethis::use_data(grattan_lightblue5, overwrite = TRUE) -grattan_lightblue6 <- "#DAE9F2" -usethis::use_data(grattan_lightblue6, overwrite = TRUE) -grattan_lightblue7 <- "#E3EEF5" -usethis::use_data(grattan_lightblue7, overwrite = TRUE) -grattan_lightblue8 <- "#EDF4F9" -usethis::use_data(grattan_lightblue8, overwrite = TRUE) - -grattan_blue <- grattan_lightblue -usethis::use_data(grattan_blue, overwrite = TRUE) -grattan_blue1 <- grattan_lightblue1 -usethis::use_data(grattan_blue1, overwrite = TRUE) -grattan_blue2 <- grattan_lightblue2 -usethis::use_data(grattan_blue2, overwrite = TRUE) -grattan_blue3 <- grattan_lightblue3 -usethis::use_data(grattan_blue3, overwrite = TRUE) -grattan_blue4 <- grattan_lightblue4 -usethis::use_data(grattan_blue4, overwrite = TRUE) -grattan_blue5 <- grattan_lightblue5 -usethis::use_data(grattan_blue5, overwrite = TRUE) -grattan_blue6 <- grattan_lightblue6 -usethis::use_data(grattan_blue6, overwrite = TRUE) -grattan_blue7 <- grattan_lightblue7 -usethis::use_data(grattan_blue7, overwrite = TRUE) -grattan_blue8 <- grattan_lightblue8 -usethis::use_data(grattan_blue8, overwrite = TRUE) - -# dark -grattan_darkblue <- "#3E81CE" -usethis::use_data(grattan_darkblue, overwrite = TRUE) -grattan_darkblue1 <- "#538FD4" -usethis::use_data(grattan_darkblue1, overwrite = TRUE) -grattan_darkblue2 <- "#699DD9" -usethis::use_data(grattan_darkblue2, overwrite = TRUE) -grattan_darkblue3 <- "#7EABDF" -usethis::use_data(grattan_darkblue3, overwrite = TRUE) -grattan_darkblue4 <- "#94B9E4" -usethis::use_data(grattan_darkblue4, overwrite = TRUE) -grattan_darkblue5 <- "#A9C7E9" -usethis::use_data(grattan_darkblue5, overwrite = TRUE) -grattan_darkblue6 <- "#BFD5EF" -usethis::use_data(grattan_darkblue6, overwrite = TRUE) -grattan_darkblue7 <- "#D4E3F4" -usethis::use_data(grattan_darkblue7, overwrite = TRUE) -grattan_darkblue8 <- "#EAF1FA" -usethis::use_data(grattan_darkblue8, overwrite = TRUE) - -# black ---- -grattan_black <- "#000000" -usethis::use_data(grattan_black, overwrite = TRUE) - - -# grey ------ - -# light -grattan_lightgrey <- "#828282" -usethis::use_data(grattan_lightgrey, overwrite = TRUE) -grattan_lightgrey1 <- "#8F8F8F" -usethis::use_data(grattan_lightgrey1, overwrite = TRUE) -grattan_lightgrey2 <- "#9B9B9B" -usethis::use_data(grattan_lightgrey2, overwrite = TRUE) -grattan_lightgrey3 <- "#A8A8A8" -usethis::use_data(grattan_lightgrey3, overwrite = TRUE) -grattan_lightgrey4 <- "#B4B4B4" -usethis::use_data(grattan_lightgrey4, overwrite = TRUE) -grattan_lightgrey5 <- "#C1C1C1" -usethis::use_data(grattan_lightgrey5, overwrite = TRUE) -grattan_lightgrey6 <- "#CDCDCD" -usethis::use_data(grattan_lightgrey6, overwrite = TRUE) -grattan_lightgrey7 <- "#DADADA" -usethis::use_data(grattan_lightgrey7, overwrite = TRUE) -grattan_lightgrey8 <- "#E6E6E6" -usethis::use_data(grattan_lightgrey8, overwrite = TRUE) - -# dark -grattan_darkgrey <- "#575757" -usethis::use_data(grattan_darkgrey, overwrite = TRUE) -grattan_darkgrey1 <- "#686868" -usethis::use_data(grattan_darkgrey1, overwrite = TRUE) -grattan_darkgrey2 <- "#797979" -usethis::use_data(grattan_darkgrey2, overwrite = TRUE) -grattan_darkgrey3 <- "#898989" -usethis::use_data(grattan_darkgrey3, overwrite = TRUE) -grattan_darkgrey4 <- "#9A9A9A" -usethis::use_data(grattan_darkgrey4, overwrite = TRUE) -grattan_darkgrey5 <- "#ABABAB" -usethis::use_data(grattan_darkgrey5, overwrite = TRUE) -grattan_darkgrey6 <- "#BCBCBC" -usethis::use_data(grattan_darkgrey6, overwrite = TRUE) -grattan_darkgrey7 <- "#CDCDCD" -usethis::use_data(grattan_darkgrey7, overwrite = TRUE) -grattan_darkgrey8 <- "#DDDDDD" -usethis::use_data(grattan_darkgrey8, overwrite = TRUE) - -# Add other specific Grattan colours -grattan_grey1 <- "#D9D9D9" -usethis::use_data(grattan_grey1, overwrite = TRUE) -grattan_grey2 <- "#AEAEAE" -usethis::use_data(grattan_grey2, overwrite = TRUE) -grattan_grey3 <- "#828282" -usethis::use_data(grattan_grey3, overwrite = TRUE) -grattan_grey4 <- "#575757" -usethis::use_data(grattan_grey4, overwrite = TRUE) -grattan_grey5 <- "#2B2B2B" -usethis::use_data(grattan_grey5, overwrite = TRUE) -grattan_grey_alpha <- "#E1E3E5" -usethis::use_data(grattan_grey_alpha, overwrite = TRUE) -grattan_grey_title <- "#6A737B" -usethis::use_data(grattan_grey_title, overwrite = TRUE) -grattan_gridlinegrey <- "#C3C7CB" -usethis::use_data(grattan_gridlinegrey, overwrite = TRUE) -grattan_orange_alpha <- "#FEF0DE" -usethis::use_data(grattan_orange_alpha, overwrite = TRUE) -grattan_box <- "#FEF0DE" -usethis::use_data(grattan_box, overwrite = TRUE) - -# Add legacy items -grattan_lightyellow_f <- "#FFE79F" -usethis::use_data(grattan_lightyellow_f, overwrite = TRUE) -grattan_yellow_f <- "#FFD283" -usethis::use_data(grattan_yellow_f, overwrite = TRUE) -grattan_lightorange_f <- "#F8A866" -usethis::use_data(grattan_lightorange_f, overwrite = TRUE) -grattan_orange_f <- "#F8A866" -usethis::use_data(grattan_orange_f, overwrite = TRUE) -grattan_darkorange_f <- "#DE815F" -usethis::use_data(grattan_darkorange_f, overwrite = TRUE) -grattan_red_f <- "#B7595C" -usethis::use_data(grattan_red_f, overwrite = TRUE) -grattan_darkred_f <- "#894D4E" -usethis::use_data(grattan_darkred_f, overwrite = TRUE) diff --git a/data-raw/create_grattan_palette_set.R b/data-raw/create_grattan_palette_set.R index 7b01ecbd..2661662b 100644 --- a/data-raw/create_grattan_palette_set.R +++ b/data-raw/create_grattan_palette_set.R @@ -1,7 +1,12 @@ # Create Grattan palette sets # Assume more/higher is better; and better is yellow (can be reversed with reverse = TRUE) - +#' The grattan colours +#' +#' These colours are used in \code{grattan_plot} and form the basis for our +#' palettes. +#' +#' @export grattan_palette_set <- list( `full` = c(grattan_red, grattan_darkorange, diff --git a/data-raw/vanilla_geom_aesthetics.R b/data-raw/vanilla_geom_aesthetics.R new file mode 100644 index 00000000..4970722a --- /dev/null +++ b/data-raw/vanilla_geom_aesthetics.R @@ -0,0 +1,33 @@ +## code to prepare `vanilla_geom_aesthetics` dataset goes here + +# Go to zzz.R and comment out set_aesthetics(type = "qnd") to make sure you +# don't overwrite the vanilla aesthetics + +devtools::load_all() +check_subclass <- utils::getFromNamespace("check_subclass", "ggplot2") + +# Library any packages that add geoms so you can take their defaults +# Check the geom names are in all_geoms in data_raw/all_geoms.R + +invisible(lapply(geom_packs, library, character.only = TRUE)) + +vanilla_geom_aesthetics <- all_geoms %>% + purrr::map( + purrr::safely(check_subclass), + "Geom", + env = parent.frame() + ) %>% + purrr::map( + purrr::pluck, + "result" + ) %>% + purrr::map( + purrr::pluck, + "default_aes" + ) %>% + purrr::set_names(all_geoms) + + +usethis::use_data(vanilla_geom_aesthetics, internal = TRUE, overwrite = TRUE) +# Uncomment that line in zzz.R +# Restart your R session diff --git a/data/all_geoms.rda b/data/all_geoms.rda new file mode 100644 index 00000000..8002904f Binary files /dev/null and b/data/all_geoms.rda differ diff --git a/data/chart_types_ext.rda b/data/chart_types_ext.rda index 130ac6c9..2d6d51d2 100644 Binary files a/data/chart_types_ext.rda and b/data/chart_types_ext.rda differ diff --git a/data/grattan_black.rda b/data/grattan_black.rda deleted file mode 100644 index af6e2a7a..00000000 Binary files a/data/grattan_black.rda and /dev/null differ diff --git a/data/grattan_blue.rda b/data/grattan_blue.rda deleted file mode 100644 index 854d990b..00000000 Binary files a/data/grattan_blue.rda and /dev/null differ diff --git a/data/grattan_blue1.rda b/data/grattan_blue1.rda deleted file mode 100644 index aae48220..00000000 Binary files a/data/grattan_blue1.rda and /dev/null differ diff --git a/data/grattan_blue2.rda b/data/grattan_blue2.rda deleted file mode 100644 index cb3f6c95..00000000 Binary files a/data/grattan_blue2.rda and /dev/null differ diff --git a/data/grattan_blue3.rda b/data/grattan_blue3.rda deleted file mode 100644 index 2c8f598b..00000000 Binary files a/data/grattan_blue3.rda and /dev/null differ diff --git a/data/grattan_blue4.rda b/data/grattan_blue4.rda deleted file mode 100644 index 8ce5a8f7..00000000 Binary files a/data/grattan_blue4.rda and /dev/null differ diff --git a/data/grattan_blue5.rda b/data/grattan_blue5.rda deleted file mode 100644 index 44bcf38f..00000000 Binary files a/data/grattan_blue5.rda and /dev/null differ diff --git a/data/grattan_blue6.rda b/data/grattan_blue6.rda deleted file mode 100644 index becd3026..00000000 Binary files a/data/grattan_blue6.rda and /dev/null differ diff --git a/data/grattan_blue7.rda b/data/grattan_blue7.rda deleted file mode 100644 index 353073f6..00000000 Binary files a/data/grattan_blue7.rda and /dev/null differ diff --git a/data/grattan_blue8.rda b/data/grattan_blue8.rda deleted file mode 100644 index 0d919a1a..00000000 Binary files a/data/grattan_blue8.rda and /dev/null differ diff --git a/data/grattan_box.rda b/data/grattan_box.rda deleted file mode 100644 index e246b732..00000000 Binary files a/data/grattan_box.rda and /dev/null differ diff --git a/data/grattan_darkblue.rda b/data/grattan_darkblue.rda deleted file mode 100644 index 45b32b84..00000000 Binary files a/data/grattan_darkblue.rda and /dev/null differ diff --git a/data/grattan_darkblue1.rda b/data/grattan_darkblue1.rda deleted file mode 100644 index 32ffa129..00000000 Binary files a/data/grattan_darkblue1.rda and /dev/null differ diff --git a/data/grattan_darkblue2.rda b/data/grattan_darkblue2.rda deleted file mode 100644 index a9b897ca..00000000 Binary files a/data/grattan_darkblue2.rda and /dev/null differ diff --git a/data/grattan_darkblue3.rda b/data/grattan_darkblue3.rda deleted file mode 100644 index 88bedd46..00000000 Binary files a/data/grattan_darkblue3.rda and /dev/null differ diff --git a/data/grattan_darkblue4.rda b/data/grattan_darkblue4.rda deleted file mode 100644 index 77f7b892..00000000 Binary files a/data/grattan_darkblue4.rda and /dev/null differ diff --git a/data/grattan_darkblue5.rda b/data/grattan_darkblue5.rda deleted file mode 100644 index 1e2a4285..00000000 Binary files a/data/grattan_darkblue5.rda and /dev/null differ diff --git a/data/grattan_darkblue6.rda b/data/grattan_darkblue6.rda deleted file mode 100644 index 56d3922b..00000000 Binary files a/data/grattan_darkblue6.rda and /dev/null differ diff --git a/data/grattan_darkblue7.rda b/data/grattan_darkblue7.rda deleted file mode 100644 index f7d3e145..00000000 Binary files a/data/grattan_darkblue7.rda and /dev/null differ diff --git a/data/grattan_darkblue8.rda b/data/grattan_darkblue8.rda deleted file mode 100644 index 86f82216..00000000 Binary files a/data/grattan_darkblue8.rda and /dev/null differ diff --git a/data/grattan_darkgrey.rda b/data/grattan_darkgrey.rda deleted file mode 100644 index 31c73bfd..00000000 Binary files a/data/grattan_darkgrey.rda and /dev/null differ diff --git a/data/grattan_darkgrey1.rda b/data/grattan_darkgrey1.rda deleted file mode 100644 index d69824b4..00000000 Binary files a/data/grattan_darkgrey1.rda and /dev/null differ diff --git a/data/grattan_darkgrey2.rda b/data/grattan_darkgrey2.rda deleted file mode 100644 index 22ab008d..00000000 Binary files a/data/grattan_darkgrey2.rda and /dev/null differ diff --git a/data/grattan_darkgrey3.rda b/data/grattan_darkgrey3.rda deleted file mode 100644 index 929ef772..00000000 Binary files a/data/grattan_darkgrey3.rda and /dev/null differ diff --git a/data/grattan_darkgrey4.rda b/data/grattan_darkgrey4.rda deleted file mode 100644 index c14d9957..00000000 Binary files a/data/grattan_darkgrey4.rda and /dev/null differ diff --git a/data/grattan_darkgrey5.rda b/data/grattan_darkgrey5.rda deleted file mode 100644 index 9ee8c8fc..00000000 Binary files a/data/grattan_darkgrey5.rda and /dev/null differ diff --git a/data/grattan_darkgrey6.rda b/data/grattan_darkgrey6.rda deleted file mode 100644 index 8fe9574f..00000000 Binary files a/data/grattan_darkgrey6.rda and /dev/null differ diff --git a/data/grattan_darkgrey7.rda b/data/grattan_darkgrey7.rda deleted file mode 100644 index 67a3218a..00000000 Binary files a/data/grattan_darkgrey7.rda and /dev/null differ diff --git a/data/grattan_darkgrey8.rda b/data/grattan_darkgrey8.rda deleted file mode 100644 index 92cb02a8..00000000 Binary files a/data/grattan_darkgrey8.rda and /dev/null differ diff --git a/data/grattan_darkorange.rda b/data/grattan_darkorange.rda deleted file mode 100644 index d2cbd8aa..00000000 Binary files a/data/grattan_darkorange.rda and /dev/null differ diff --git a/data/grattan_darkorange1.rda b/data/grattan_darkorange1.rda deleted file mode 100644 index ad120b99..00000000 Binary files a/data/grattan_darkorange1.rda and /dev/null differ diff --git a/data/grattan_darkorange2.rda b/data/grattan_darkorange2.rda deleted file mode 100644 index d2c79dda..00000000 Binary files a/data/grattan_darkorange2.rda and /dev/null differ diff --git a/data/grattan_darkorange3.rda b/data/grattan_darkorange3.rda deleted file mode 100644 index 4df1c87e..00000000 Binary files a/data/grattan_darkorange3.rda and /dev/null differ diff --git a/data/grattan_darkorange4.rda b/data/grattan_darkorange4.rda deleted file mode 100644 index c46b860e..00000000 Binary files a/data/grattan_darkorange4.rda and /dev/null differ diff --git a/data/grattan_darkorange5.rda b/data/grattan_darkorange5.rda deleted file mode 100644 index b162a0d0..00000000 Binary files a/data/grattan_darkorange5.rda and /dev/null differ diff --git a/data/grattan_darkorange6.rda b/data/grattan_darkorange6.rda deleted file mode 100644 index c496c4bf..00000000 Binary files a/data/grattan_darkorange6.rda and /dev/null differ diff --git a/data/grattan_darkorange7.rda b/data/grattan_darkorange7.rda deleted file mode 100644 index 42aa39f0..00000000 Binary files a/data/grattan_darkorange7.rda and /dev/null differ diff --git a/data/grattan_darkorange8.rda b/data/grattan_darkorange8.rda deleted file mode 100644 index 2d8a95b4..00000000 Binary files a/data/grattan_darkorange8.rda and /dev/null differ diff --git a/data/grattan_darkorange_f.rda b/data/grattan_darkorange_f.rda deleted file mode 100644 index abd8cfba..00000000 Binary files a/data/grattan_darkorange_f.rda and /dev/null differ diff --git a/data/grattan_darkred.rda b/data/grattan_darkred.rda deleted file mode 100644 index 00926684..00000000 Binary files a/data/grattan_darkred.rda and /dev/null differ diff --git a/data/grattan_darkred1.rda b/data/grattan_darkred1.rda deleted file mode 100644 index be351028..00000000 Binary files a/data/grattan_darkred1.rda and /dev/null differ diff --git a/data/grattan_darkred2.rda b/data/grattan_darkred2.rda deleted file mode 100644 index 0e02c5fb..00000000 Binary files a/data/grattan_darkred2.rda and /dev/null differ diff --git a/data/grattan_darkred3.rda b/data/grattan_darkred3.rda deleted file mode 100644 index cd7d38d6..00000000 Binary files a/data/grattan_darkred3.rda and /dev/null differ diff --git a/data/grattan_darkred4.rda b/data/grattan_darkred4.rda deleted file mode 100644 index 38861464..00000000 Binary files a/data/grattan_darkred4.rda and /dev/null differ diff --git a/data/grattan_darkred5.rda b/data/grattan_darkred5.rda deleted file mode 100644 index b0ca6325..00000000 Binary files a/data/grattan_darkred5.rda and /dev/null differ diff --git a/data/grattan_darkred6.rda b/data/grattan_darkred6.rda deleted file mode 100644 index a6057c96..00000000 Binary files a/data/grattan_darkred6.rda and /dev/null differ diff --git a/data/grattan_darkred7.rda b/data/grattan_darkred7.rda deleted file mode 100644 index 5340d46e..00000000 Binary files a/data/grattan_darkred7.rda and /dev/null differ diff --git a/data/grattan_darkred8.rda b/data/grattan_darkred8.rda deleted file mode 100644 index ff551a04..00000000 Binary files a/data/grattan_darkred8.rda and /dev/null differ diff --git a/data/grattan_darkred_f.rda b/data/grattan_darkred_f.rda deleted file mode 100644 index ceec30ae..00000000 Binary files a/data/grattan_darkred_f.rda and /dev/null differ diff --git a/data/grattan_darkyellow.rda b/data/grattan_darkyellow.rda deleted file mode 100644 index 6cf3eb72..00000000 Binary files a/data/grattan_darkyellow.rda and /dev/null differ diff --git a/data/grattan_darkyellow1.rda b/data/grattan_darkyellow1.rda deleted file mode 100644 index 1b30b80f..00000000 Binary files a/data/grattan_darkyellow1.rda and /dev/null differ diff --git a/data/grattan_darkyellow2.rda b/data/grattan_darkyellow2.rda deleted file mode 100644 index b55d99ed..00000000 Binary files a/data/grattan_darkyellow2.rda and /dev/null differ diff --git a/data/grattan_darkyellow3.rda b/data/grattan_darkyellow3.rda deleted file mode 100644 index c6254f47..00000000 Binary files a/data/grattan_darkyellow3.rda and /dev/null differ diff --git a/data/grattan_darkyellow4.rda b/data/grattan_darkyellow4.rda deleted file mode 100644 index b1b5a3f9..00000000 Binary files a/data/grattan_darkyellow4.rda and /dev/null differ diff --git a/data/grattan_darkyellow5.rda b/data/grattan_darkyellow5.rda deleted file mode 100644 index 697eafb0..00000000 Binary files a/data/grattan_darkyellow5.rda and /dev/null differ diff --git a/data/grattan_darkyellow6.rda b/data/grattan_darkyellow6.rda deleted file mode 100644 index 7ab43ac2..00000000 Binary files a/data/grattan_darkyellow6.rda and /dev/null differ diff --git a/data/grattan_darkyellow7.rda b/data/grattan_darkyellow7.rda deleted file mode 100644 index 31e5cc20..00000000 Binary files a/data/grattan_darkyellow7.rda and /dev/null differ diff --git a/data/grattan_darkyellow8.rda b/data/grattan_darkyellow8.rda deleted file mode 100644 index fd736b42..00000000 Binary files a/data/grattan_darkyellow8.rda and /dev/null differ diff --git a/data/grattan_grey1.rda b/data/grattan_grey1.rda deleted file mode 100644 index 2672c96d..00000000 Binary files a/data/grattan_grey1.rda and /dev/null differ diff --git a/data/grattan_grey2.rda b/data/grattan_grey2.rda deleted file mode 100644 index 86c7f9bb..00000000 Binary files a/data/grattan_grey2.rda and /dev/null differ diff --git a/data/grattan_grey3.rda b/data/grattan_grey3.rda deleted file mode 100644 index d0e5bf16..00000000 Binary files a/data/grattan_grey3.rda and /dev/null differ diff --git a/data/grattan_grey4.rda b/data/grattan_grey4.rda deleted file mode 100644 index 735e8f55..00000000 Binary files a/data/grattan_grey4.rda and /dev/null differ diff --git a/data/grattan_grey5.rda b/data/grattan_grey5.rda deleted file mode 100644 index 7680c995..00000000 Binary files a/data/grattan_grey5.rda and /dev/null differ diff --git a/data/grattan_grey_alpha.rda b/data/grattan_grey_alpha.rda deleted file mode 100644 index 5664f3af..00000000 Binary files a/data/grattan_grey_alpha.rda and /dev/null differ diff --git a/data/grattan_grey_title.rda b/data/grattan_grey_title.rda deleted file mode 100644 index 32741282..00000000 Binary files a/data/grattan_grey_title.rda and /dev/null differ diff --git a/data/grattan_gridlinegrey.rda b/data/grattan_gridlinegrey.rda deleted file mode 100644 index 0e01b0ea..00000000 Binary files a/data/grattan_gridlinegrey.rda and /dev/null differ diff --git a/data/grattan_lightblue.rda b/data/grattan_lightblue.rda deleted file mode 100644 index 656fcb0a..00000000 Binary files a/data/grattan_lightblue.rda and /dev/null differ diff --git a/data/grattan_lightblue1.rda b/data/grattan_lightblue1.rda deleted file mode 100644 index c5b37c88..00000000 Binary files a/data/grattan_lightblue1.rda and /dev/null differ diff --git a/data/grattan_lightblue2.rda b/data/grattan_lightblue2.rda deleted file mode 100644 index ee303d57..00000000 Binary files a/data/grattan_lightblue2.rda and /dev/null differ diff --git a/data/grattan_lightblue3.rda b/data/grattan_lightblue3.rda deleted file mode 100644 index d4989c34..00000000 Binary files a/data/grattan_lightblue3.rda and /dev/null differ diff --git a/data/grattan_lightblue4.rda b/data/grattan_lightblue4.rda deleted file mode 100644 index cc0b20ae..00000000 Binary files a/data/grattan_lightblue4.rda and /dev/null differ diff --git a/data/grattan_lightblue5.rda b/data/grattan_lightblue5.rda deleted file mode 100644 index 330babfa..00000000 Binary files a/data/grattan_lightblue5.rda and /dev/null differ diff --git a/data/grattan_lightblue6.rda b/data/grattan_lightblue6.rda deleted file mode 100644 index 0a734610..00000000 Binary files a/data/grattan_lightblue6.rda and /dev/null differ diff --git a/data/grattan_lightblue7.rda b/data/grattan_lightblue7.rda deleted file mode 100644 index dcea2012..00000000 Binary files a/data/grattan_lightblue7.rda and /dev/null differ diff --git a/data/grattan_lightblue8.rda b/data/grattan_lightblue8.rda deleted file mode 100644 index ced57c29..00000000 Binary files a/data/grattan_lightblue8.rda and /dev/null differ diff --git a/data/grattan_lightgrey.rda b/data/grattan_lightgrey.rda deleted file mode 100644 index b43ec030..00000000 Binary files a/data/grattan_lightgrey.rda and /dev/null differ diff --git a/data/grattan_lightgrey1.rda b/data/grattan_lightgrey1.rda deleted file mode 100644 index cba5cd77..00000000 Binary files a/data/grattan_lightgrey1.rda and /dev/null differ diff --git a/data/grattan_lightgrey2.rda b/data/grattan_lightgrey2.rda deleted file mode 100644 index fb91463d..00000000 Binary files a/data/grattan_lightgrey2.rda and /dev/null differ diff --git a/data/grattan_lightgrey3.rda b/data/grattan_lightgrey3.rda deleted file mode 100644 index c32c8bc1..00000000 Binary files a/data/grattan_lightgrey3.rda and /dev/null differ diff --git a/data/grattan_lightgrey4.rda b/data/grattan_lightgrey4.rda deleted file mode 100644 index 636c37cd..00000000 Binary files a/data/grattan_lightgrey4.rda and /dev/null differ diff --git a/data/grattan_lightgrey5.rda b/data/grattan_lightgrey5.rda deleted file mode 100644 index 0707866f..00000000 Binary files a/data/grattan_lightgrey5.rda and /dev/null differ diff --git a/data/grattan_lightgrey6.rda b/data/grattan_lightgrey6.rda deleted file mode 100644 index b3d0f2fe..00000000 Binary files a/data/grattan_lightgrey6.rda and /dev/null differ diff --git a/data/grattan_lightgrey7.rda b/data/grattan_lightgrey7.rda deleted file mode 100644 index f0d781ac..00000000 Binary files a/data/grattan_lightgrey7.rda and /dev/null differ diff --git a/data/grattan_lightgrey8.rda b/data/grattan_lightgrey8.rda deleted file mode 100644 index 541dbbed..00000000 Binary files a/data/grattan_lightgrey8.rda and /dev/null differ diff --git a/data/grattan_lightorange.rda b/data/grattan_lightorange.rda deleted file mode 100644 index 38d3160c..00000000 Binary files a/data/grattan_lightorange.rda and /dev/null differ diff --git a/data/grattan_lightorange1.rda b/data/grattan_lightorange1.rda deleted file mode 100644 index 084a942b..00000000 Binary files a/data/grattan_lightorange1.rda and /dev/null differ diff --git a/data/grattan_lightorange2.rda b/data/grattan_lightorange2.rda deleted file mode 100644 index f051ab52..00000000 Binary files a/data/grattan_lightorange2.rda and /dev/null differ diff --git a/data/grattan_lightorange3.rda b/data/grattan_lightorange3.rda deleted file mode 100644 index 6e8c4b9c..00000000 Binary files a/data/grattan_lightorange3.rda and /dev/null differ diff --git a/data/grattan_lightorange4.rda b/data/grattan_lightorange4.rda deleted file mode 100644 index bba07f7d..00000000 Binary files a/data/grattan_lightorange4.rda and /dev/null differ diff --git a/data/grattan_lightorange5.rda b/data/grattan_lightorange5.rda deleted file mode 100644 index 681fe6af..00000000 Binary files a/data/grattan_lightorange5.rda and /dev/null differ diff --git a/data/grattan_lightorange6.rda b/data/grattan_lightorange6.rda deleted file mode 100644 index ef37cee5..00000000 Binary files a/data/grattan_lightorange6.rda and /dev/null differ diff --git a/data/grattan_lightorange7.rda b/data/grattan_lightorange7.rda deleted file mode 100644 index 3af9dc79..00000000 Binary files a/data/grattan_lightorange7.rda and /dev/null differ diff --git a/data/grattan_lightorange8.rda b/data/grattan_lightorange8.rda deleted file mode 100644 index 58b0196f..00000000 Binary files a/data/grattan_lightorange8.rda and /dev/null differ diff --git a/data/grattan_lightorange_f.rda b/data/grattan_lightorange_f.rda deleted file mode 100644 index 678fef69..00000000 Binary files a/data/grattan_lightorange_f.rda and /dev/null differ diff --git a/data/grattan_lightred.rda b/data/grattan_lightred.rda deleted file mode 100644 index a01551fd..00000000 Binary files a/data/grattan_lightred.rda and /dev/null differ diff --git a/data/grattan_lightred1.rda b/data/grattan_lightred1.rda deleted file mode 100644 index 23171ed3..00000000 Binary files a/data/grattan_lightred1.rda and /dev/null differ diff --git a/data/grattan_lightred2.rda b/data/grattan_lightred2.rda deleted file mode 100644 index 31dec2ef..00000000 Binary files a/data/grattan_lightred2.rda and /dev/null differ diff --git a/data/grattan_lightred3.rda b/data/grattan_lightred3.rda deleted file mode 100644 index bc3e9c08..00000000 Binary files a/data/grattan_lightred3.rda and /dev/null differ diff --git a/data/grattan_lightred4.rda b/data/grattan_lightred4.rda deleted file mode 100644 index 21480bf6..00000000 Binary files a/data/grattan_lightred4.rda and /dev/null differ diff --git a/data/grattan_lightred5.rda b/data/grattan_lightred5.rda deleted file mode 100644 index 91c65e62..00000000 Binary files a/data/grattan_lightred5.rda and /dev/null differ diff --git a/data/grattan_lightred6.rda b/data/grattan_lightred6.rda deleted file mode 100644 index 59bbc8e1..00000000 Binary files a/data/grattan_lightred6.rda and /dev/null differ diff --git a/data/grattan_lightred7.rda b/data/grattan_lightred7.rda deleted file mode 100644 index e98abd2f..00000000 Binary files a/data/grattan_lightred7.rda and /dev/null differ diff --git a/data/grattan_lightred8.rda b/data/grattan_lightred8.rda deleted file mode 100644 index b57fec9f..00000000 Binary files a/data/grattan_lightred8.rda and /dev/null differ diff --git a/data/grattan_lightyellow.rda b/data/grattan_lightyellow.rda deleted file mode 100644 index 8d30aa64..00000000 Binary files a/data/grattan_lightyellow.rda and /dev/null differ diff --git a/data/grattan_lightyellow1.rda b/data/grattan_lightyellow1.rda deleted file mode 100644 index 747c4f3a..00000000 Binary files a/data/grattan_lightyellow1.rda and /dev/null differ diff --git a/data/grattan_lightyellow2.rda b/data/grattan_lightyellow2.rda deleted file mode 100644 index ca7e3390..00000000 Binary files a/data/grattan_lightyellow2.rda and /dev/null differ diff --git a/data/grattan_lightyellow3.rda b/data/grattan_lightyellow3.rda deleted file mode 100644 index b23d35b0..00000000 Binary files a/data/grattan_lightyellow3.rda and /dev/null differ diff --git a/data/grattan_lightyellow4.rda b/data/grattan_lightyellow4.rda deleted file mode 100644 index 24cdb78d..00000000 Binary files a/data/grattan_lightyellow4.rda and /dev/null differ diff --git a/data/grattan_lightyellow5.rda b/data/grattan_lightyellow5.rda deleted file mode 100644 index f411bc90..00000000 Binary files a/data/grattan_lightyellow5.rda and /dev/null differ diff --git a/data/grattan_lightyellow6.rda b/data/grattan_lightyellow6.rda deleted file mode 100644 index 923b2f7c..00000000 Binary files a/data/grattan_lightyellow6.rda and /dev/null differ diff --git a/data/grattan_lightyellow7.rda b/data/grattan_lightyellow7.rda deleted file mode 100644 index 6948bd4a..00000000 Binary files a/data/grattan_lightyellow7.rda and /dev/null differ diff --git a/data/grattan_lightyellow8.rda b/data/grattan_lightyellow8.rda deleted file mode 100644 index b8726215..00000000 Binary files a/data/grattan_lightyellow8.rda and /dev/null differ diff --git a/data/grattan_lightyellow_f.rda b/data/grattan_lightyellow_f.rda deleted file mode 100644 index a52af50d..00000000 Binary files a/data/grattan_lightyellow_f.rda and /dev/null differ diff --git a/data/grattan_orange.rda b/data/grattan_orange.rda deleted file mode 100644 index 3979fb4b..00000000 Binary files a/data/grattan_orange.rda and /dev/null differ diff --git a/data/grattan_orange1.rda b/data/grattan_orange1.rda deleted file mode 100644 index 8d49106a..00000000 Binary files a/data/grattan_orange1.rda and /dev/null differ diff --git a/data/grattan_orange2.rda b/data/grattan_orange2.rda deleted file mode 100644 index 69be9709..00000000 Binary files a/data/grattan_orange2.rda and /dev/null differ diff --git a/data/grattan_orange3.rda b/data/grattan_orange3.rda deleted file mode 100644 index 17171532..00000000 Binary files a/data/grattan_orange3.rda and /dev/null differ diff --git a/data/grattan_orange4.rda b/data/grattan_orange4.rda deleted file mode 100644 index 6c9e8cf4..00000000 Binary files a/data/grattan_orange4.rda and /dev/null differ diff --git a/data/grattan_orange5.rda b/data/grattan_orange5.rda deleted file mode 100644 index d622c789..00000000 Binary files a/data/grattan_orange5.rda and /dev/null differ diff --git a/data/grattan_orange6.rda b/data/grattan_orange6.rda deleted file mode 100644 index 5aa3e1e9..00000000 Binary files a/data/grattan_orange6.rda and /dev/null differ diff --git a/data/grattan_orange7.rda b/data/grattan_orange7.rda deleted file mode 100644 index 48922913..00000000 Binary files a/data/grattan_orange7.rda and /dev/null differ diff --git a/data/grattan_orange8.rda b/data/grattan_orange8.rda deleted file mode 100644 index cf02fb00..00000000 Binary files a/data/grattan_orange8.rda and /dev/null differ diff --git a/data/grattan_orange_alpha.rda b/data/grattan_orange_alpha.rda deleted file mode 100644 index b7451b71..00000000 Binary files a/data/grattan_orange_alpha.rda and /dev/null differ diff --git a/data/grattan_orange_f.rda b/data/grattan_orange_f.rda deleted file mode 100644 index 8d27ec66..00000000 Binary files a/data/grattan_orange_f.rda and /dev/null differ diff --git a/data/grattan_red.rda b/data/grattan_red.rda deleted file mode 100644 index b933f0b9..00000000 Binary files a/data/grattan_red.rda and /dev/null differ diff --git a/data/grattan_red1.rda b/data/grattan_red1.rda deleted file mode 100644 index b3c3de62..00000000 Binary files a/data/grattan_red1.rda and /dev/null differ diff --git a/data/grattan_red2.rda b/data/grattan_red2.rda deleted file mode 100644 index bcb7da6d..00000000 Binary files a/data/grattan_red2.rda and /dev/null differ diff --git a/data/grattan_red3.rda b/data/grattan_red3.rda deleted file mode 100644 index a2177836..00000000 Binary files a/data/grattan_red3.rda and /dev/null differ diff --git a/data/grattan_red4.rda b/data/grattan_red4.rda deleted file mode 100644 index 83d24a0c..00000000 Binary files a/data/grattan_red4.rda and /dev/null differ diff --git a/data/grattan_red5.rda b/data/grattan_red5.rda deleted file mode 100644 index 825f5eab..00000000 Binary files a/data/grattan_red5.rda and /dev/null differ diff --git a/data/grattan_red6.rda b/data/grattan_red6.rda deleted file mode 100644 index 84649958..00000000 Binary files a/data/grattan_red6.rda and /dev/null differ diff --git a/data/grattan_red7.rda b/data/grattan_red7.rda deleted file mode 100644 index 89d97401..00000000 Binary files a/data/grattan_red7.rda and /dev/null differ diff --git a/data/grattan_red8.rda b/data/grattan_red8.rda deleted file mode 100644 index 2be063a4..00000000 Binary files a/data/grattan_red8.rda and /dev/null differ diff --git a/data/grattan_red_f.rda b/data/grattan_red_f.rda deleted file mode 100644 index eb91fa6b..00000000 Binary files a/data/grattan_red_f.rda and /dev/null differ diff --git a/data/grattan_yellow.rda b/data/grattan_yellow.rda deleted file mode 100644 index c300fded..00000000 Binary files a/data/grattan_yellow.rda and /dev/null differ diff --git a/data/grattan_yellow1.rda b/data/grattan_yellow1.rda deleted file mode 100644 index 477c5aa1..00000000 Binary files a/data/grattan_yellow1.rda and /dev/null differ diff --git a/data/grattan_yellow2.rda b/data/grattan_yellow2.rda deleted file mode 100644 index e1facaa4..00000000 Binary files a/data/grattan_yellow2.rda and /dev/null differ diff --git a/data/grattan_yellow3.rda b/data/grattan_yellow3.rda deleted file mode 100644 index 534c2d2f..00000000 Binary files a/data/grattan_yellow3.rda and /dev/null differ diff --git a/data/grattan_yellow4.rda b/data/grattan_yellow4.rda deleted file mode 100644 index 3563b140..00000000 Binary files a/data/grattan_yellow4.rda and /dev/null differ diff --git a/data/grattan_yellow5.rda b/data/grattan_yellow5.rda deleted file mode 100644 index c323625c..00000000 Binary files a/data/grattan_yellow5.rda and /dev/null differ diff --git a/data/grattan_yellow6.rda b/data/grattan_yellow6.rda deleted file mode 100644 index eb89bd7e..00000000 Binary files a/data/grattan_yellow6.rda and /dev/null differ diff --git a/data/grattan_yellow7.rda b/data/grattan_yellow7.rda deleted file mode 100644 index 982556db..00000000 Binary files a/data/grattan_yellow7.rda and /dev/null differ diff --git a/data/grattan_yellow8.rda b/data/grattan_yellow8.rda deleted file mode 100644 index deab3d70..00000000 Binary files a/data/grattan_yellow8.rda and /dev/null differ diff --git a/data/grattan_yellow_f.rda b/data/grattan_yellow_f.rda deleted file mode 100644 index d9a41829..00000000 Binary files a/data/grattan_yellow_f.rda and /dev/null differ diff --git a/inst/extdata/template_169.pptx b/inst/extdata/template_169.pptx index 7ecf3ba3..eb19325e 100644 Binary files a/inst/extdata/template_169.pptx and b/inst/extdata/template_169.pptx differ diff --git a/inst/extdata/template_2022.pptx b/inst/extdata/template_2022.pptx new file mode 100644 index 00000000..fce4eb83 Binary files /dev/null and b/inst/extdata/template_2022.pptx differ diff --git a/inst/extdata/template_43.pptx b/inst/extdata/template_43.pptx index 4bdc7cce..515ff0ee 100644 Binary files a/inst/extdata/template_43.pptx and b/inst/extdata/template_43.pptx differ diff --git a/inst/extdata/template_blog.pptx b/inst/extdata/template_blog.pptx index f12faa7b..222488d7 100644 Binary files a/inst/extdata/template_blog.pptx and b/inst/extdata/template_blog.pptx differ diff --git a/inst/extdata/template_blog_half.pptx b/inst/extdata/template_blog_half.pptx deleted file mode 100644 index b7b79b0a..00000000 Binary files a/inst/extdata/template_blog_half.pptx and /dev/null differ diff --git a/inst/extdata/template_fullpage.pptx b/inst/extdata/template_fullpage.pptx index 8dd5a244..d5d6266a 100644 Binary files a/inst/extdata/template_fullpage.pptx and b/inst/extdata/template_fullpage.pptx differ diff --git a/inst/extdata/template_normal.pptx b/inst/extdata/template_normal.pptx index 9311a6a4..d3757ecf 100644 Binary files a/inst/extdata/template_normal.pptx and b/inst/extdata/template_normal.pptx differ diff --git a/inst/extdata/template_old_169.pptx b/inst/extdata/template_old_169.pptx deleted file mode 100644 index eb63030b..00000000 Binary files a/inst/extdata/template_old_169.pptx and /dev/null differ diff --git a/inst/extdata/template_wholecolumn.pptx b/inst/extdata/template_wholecolumn.pptx index b491c885..34ad730e 100644 Binary files a/inst/extdata/template_wholecolumn.pptx and b/inst/extdata/template_wholecolumn.pptx differ diff --git a/man/add_graph_to_pptx.Rd b/man/add_graph_to_pptx.Rd index a0b87ac6..f3eda816 100644 --- a/man/add_graph_to_pptx.Rd +++ b/man/add_graph_to_pptx.Rd @@ -5,14 +5,16 @@ \title{Take a pre-existing PPTX document with n slides and a list of n ggplot2 objects; add one object to each slide using officer} \usage{ -add_graph_to_pptx(p, filename, type) +add_graph_to_pptx(p, filename, type, num_slides) } \arguments{ -\item{p}{list of plot(s)} +\item{p}{a ggplot} \item{filename}{filename incl. path to an existing PPTX file} \item{type}{a grattantheme chart type with a PPTX template} + +\item{num_slides}{number of slides to make} } \description{ Take a pre-existing PPTX document with n slides and a list of n ggplot2 diff --git a/man/all_geoms.Rd b/man/all_geoms.Rd new file mode 100644 index 00000000..33262ee7 --- /dev/null +++ b/man/all_geoms.Rd @@ -0,0 +1,18 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/z_default_aesthetics.R +\docType{data} +\name{all_geoms} +\alias{all_geoms} +\title{A vector of geoms} +\format{ +A vector +} +\usage{ +all_geoms +} +\description{ +A vector of geoms exported from `{ggplot2}` and extension packages. This +vector is iterated on to set the default aesthetics for each geom, allowing +the grattan colours to be plotted automatically. +} +\keyword{datasets} diff --git a/man/check_chart_aspect_ratio.Rd b/man/check_chart_aspect_ratio.Rd index 4660f0d8..e7f39275 100644 --- a/man/check_chart_aspect_ratio.Rd +++ b/man/check_chart_aspect_ratio.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/chart_helper.R +% Please edit documentation in R/chart_helpers.R \name{check_chart_aspect_ratio} \alias{check_chart_aspect_ratio} \title{Check that your chart looks alright in the different chart formats} diff --git a/man/dot-prep_aes.Rd b/man/dot-prep_aes.Rd new file mode 100644 index 00000000..44771635 --- /dev/null +++ b/man/dot-prep_aes.Rd @@ -0,0 +1,30 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/z_default_aesthetics.R +\name{.prep_aes} +\alias{.prep_aes} +\title{Prepare `{ggplot2}` geom_ defaults} +\usage{ +.prep_aes(geom, aes, setting) +} +\arguments{ +\item{geom}{(character) the geom to change (e.g. \code{point} or +\code{line})} + +\item{aes}{(character) the aesthetic to change (e.g. \code{colour} or +\code{alpha})} + +\item{setting}{(various) what to set the aesthetic (e.g. a colour or a +number)} +} +\value{ +the default aesthetic ready to be set +} +\description{ +ggplot2 geoms have default aesthetics which can be changed for each +session. This function is a generalised way to set geom defaults. It only +changes settings where the default is not NA; no need for \code{geom_point} +to have a default font family. +} +\details{ +This is used inside `.set_grattab_aesthetics()` +} diff --git a/man/dot-set_geom_aesthetics.Rd b/man/dot-set_geom_aesthetics.Rd new file mode 100644 index 00000000..d17cdf71 --- /dev/null +++ b/man/dot-set_geom_aesthetics.Rd @@ -0,0 +1,18 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/z_default_aesthetics.R +\name{.set_geom_aesthetics} +\alias{.set_geom_aesthetics} +\title{Set default geom aesthetics} +\usage{ +.set_geom_aesthetics(geom, new) +} +\arguments{ +\item{geom}{Name of geom/stat to modify (like "point" or "bin"), or a +Geom/Stat object (like GeomPoint or StatBin).} + +\item{new}{Named list of aesthetics.} +} +\description{ +All arguments are passed to \code{ggplot2::update_geom_defaults}, but this +function adds a \code{NULL} check. +} diff --git a/man/dot-set_grattan_aesthetics.Rd b/man/dot-set_grattan_aesthetics.Rd new file mode 100644 index 00000000..78556cb6 --- /dev/null +++ b/man/dot-set_grattan_aesthetics.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/z_default_aesthetics.R +\name{.set_grattan_aesthetics} +\alias{.set_grattan_aesthetics} +\title{Set the default ggplot2 aesthetics to grattan branding} +\usage{ +.set_grattan_aesthetics() +} +\description{ +A wrapper for a bunch of other functions to set ggplot2 default aesthetics. +} diff --git a/man/figures/README-show-cols-image-1.png b/man/figures/README-show-cols-image-1.png index dd64aad6..c75a1020 100644 Binary files a/man/figures/README-show-cols-image-1.png and b/man/figures/README-show-cols-image-1.png differ diff --git a/man/grattan_black.Rd b/man/grattan_black.Rd index b6bb7381..339d96e2 100644 --- a/man/grattan_black.Rd +++ b/man/grattan_black.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_black} \alias{grattan_black} -\title{Hex code for the colour: Grattan Black (normal black)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_black } \description{ -#000000 +' } \keyword{datasets} diff --git a/man/grattan_blue.Rd b/man/grattan_blue.Rd index 0b000ee2..bdc16048 100644 --- a/man/grattan_blue.Rd +++ b/man/grattan_blue.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_blue} \alias{grattan_blue} -\title{Hex code for the colour: Grattan Blue (alias for Grattan Light Blue)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_blue } \description{ -#A3C7DF +' } \keyword{datasets} diff --git a/man/grattan_blue1.Rd b/man/grattan_blue1.Rd index 4a540ccb..b739bab4 100644 --- a/man/grattan_blue1.Rd +++ b/man/grattan_blue1.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_blue1} \alias{grattan_blue1} -\title{Hex code for the colour: Grattan Blue [tint 1] (alias for Grattan Light Blue1)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_blue1 } \description{ -#ACCDE2 +' } \keyword{datasets} diff --git a/man/grattan_blue2.Rd b/man/grattan_blue2.Rd index c918f6d4..ecdb2ba6 100644 --- a/man/grattan_blue2.Rd +++ b/man/grattan_blue2.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_blue2} \alias{grattan_blue2} -\title{Hex code for the colour: Grattan Blue [tint 2] (alias for Grattan Light Blue2)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_blue2 } \description{ -#B5D2E5 +' } \keyword{datasets} diff --git a/man/grattan_blue3.Rd b/man/grattan_blue3.Rd index 9eb0aad0..3cc6b0ef 100644 --- a/man/grattan_blue3.Rd +++ b/man/grattan_blue3.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_blue3} \alias{grattan_blue3} -\title{Hex code for the colour: Grattan Blue [tint 3] (alias for Grattan Light Blue3)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_blue3 } \description{ -#BFD8E9 +' } \keyword{datasets} diff --git a/man/grattan_blue4.Rd b/man/grattan_blue4.Rd index d9ecaedb..46bc5019 100644 --- a/man/grattan_blue4.Rd +++ b/man/grattan_blue4.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_blue4} \alias{grattan_blue4} -\title{Hex code for the colour: Grattan Blue [tint 4] (alias for Grattan Light Blue4)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_blue4 } \description{ -#C8DDEC +' } \keyword{datasets} diff --git a/man/grattan_blue5.Rd b/man/grattan_blue5.Rd index 6b025a29..305d7c3a 100644 --- a/man/grattan_blue5.Rd +++ b/man/grattan_blue5.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_blue5} \alias{grattan_blue5} -\title{Hex code for the colour: Grattan Blue [tint 5] (alias for Grattan Light Blue5)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_blue5 } \description{ -#D1E3EF +' } \keyword{datasets} diff --git a/man/grattan_blue6.Rd b/man/grattan_blue6.Rd index 88817e42..a23de1b9 100644 --- a/man/grattan_blue6.Rd +++ b/man/grattan_blue6.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_blue6} \alias{grattan_blue6} -\title{Hex code for the colour: Grattan Blue [tint 6] (alias for Grattan Light Blue6)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_blue6 } \description{ -#DAE9F2 +' } \keyword{datasets} diff --git a/man/grattan_blue7.Rd b/man/grattan_blue7.Rd index d124c4cc..91a984f2 100644 --- a/man/grattan_blue7.Rd +++ b/man/grattan_blue7.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_blue7} \alias{grattan_blue7} -\title{Hex code for the colour: Grattan Blue [tint 7] (alias for Grattan Light Blue7)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_blue7 } \description{ -#E3EEF5 +' } \keyword{datasets} diff --git a/man/grattan_blue8.Rd b/man/grattan_blue8.Rd index 677770a4..be6eebce 100644 --- a/man/grattan_blue8.Rd +++ b/man/grattan_blue8.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_blue8} \alias{grattan_blue8} -\title{Hex code for the colour: Grattan Blue [tint 8] (alias for Grattan Light Blue8)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_blue8 } \description{ -#EDF4F9 +' } \keyword{datasets} diff --git a/man/grattan_box.Rd b/man/grattan_box.Rd index 7c294f9a..d32b494c 100644 --- a/man/grattan_box.Rd +++ b/man/grattan_box.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_box} \alias{grattan_box} -\title{Hex code for the colour used for Grattan box backgrounds (orange alpha)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_box } \description{ -#FEF0DE +' } \keyword{datasets} diff --git a/man/grattan_darkblue.Rd b/man/grattan_darkblue.Rd index d328c9e9..2d8b067f 100644 --- a/man/grattan_darkblue.Rd +++ b/man/grattan_darkblue.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkblue} \alias{grattan_darkblue} -\title{Hex code for the colour: Grattan Dark Blue} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkblue } \description{ -#3E81CE +' } \keyword{datasets} diff --git a/man/grattan_darkblue1.Rd b/man/grattan_darkblue1.Rd index 07c03e3e..79318bd4 100644 --- a/man/grattan_darkblue1.Rd +++ b/man/grattan_darkblue1.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkblue1} \alias{grattan_darkblue1} -\title{Hex code for the colour: Grattan Dark Blue [tint 1]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkblue1 } \description{ -#538FD4 +' } \keyword{datasets} diff --git a/man/grattan_darkblue2.Rd b/man/grattan_darkblue2.Rd index 7786631a..a5b564a9 100644 --- a/man/grattan_darkblue2.Rd +++ b/man/grattan_darkblue2.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkblue2} \alias{grattan_darkblue2} -\title{Hex code for the colour: Grattan Dark Blue [tint 2]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkblue2 } \description{ -#699DD9 +' } \keyword{datasets} diff --git a/man/grattan_darkblue3.Rd b/man/grattan_darkblue3.Rd index dd216532..1af263f6 100644 --- a/man/grattan_darkblue3.Rd +++ b/man/grattan_darkblue3.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkblue3} \alias{grattan_darkblue3} -\title{Hex code for the colour: Grattan Dark Blue [tint 3]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkblue3 } \description{ -#7EABDF +' } \keyword{datasets} diff --git a/man/grattan_darkblue4.Rd b/man/grattan_darkblue4.Rd index e78ced12..dd701b13 100644 --- a/man/grattan_darkblue4.Rd +++ b/man/grattan_darkblue4.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkblue4} \alias{grattan_darkblue4} -\title{Hex code for the colour: Grattan Dark Blue [tint 4]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkblue4 } \description{ -#94B9E4 +' } \keyword{datasets} diff --git a/man/grattan_darkblue5.Rd b/man/grattan_darkblue5.Rd index eeb61f9d..76f6d59d 100644 --- a/man/grattan_darkblue5.Rd +++ b/man/grattan_darkblue5.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkblue5} \alias{grattan_darkblue5} -\title{Hex code for the colour: Grattan Dark Blue [tint 5]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkblue5 } \description{ -#A9C7E9 +' } \keyword{datasets} diff --git a/man/grattan_darkblue6.Rd b/man/grattan_darkblue6.Rd index 492fa2d6..b09f381a 100644 --- a/man/grattan_darkblue6.Rd +++ b/man/grattan_darkblue6.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkblue6} \alias{grattan_darkblue6} -\title{Hex code for the colour: Grattan Dark Blue [tint 6]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkblue6 } \description{ -#BFD5EF +' } \keyword{datasets} diff --git a/man/grattan_darkblue7.Rd b/man/grattan_darkblue7.Rd index 0ea58501..677c5029 100644 --- a/man/grattan_darkblue7.Rd +++ b/man/grattan_darkblue7.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkblue7} \alias{grattan_darkblue7} -\title{Hex code for the colour: Grattan Dark Blue [tint 7]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkblue7 } \description{ -#D4E3F4 +' } \keyword{datasets} diff --git a/man/grattan_darkblue8.Rd b/man/grattan_darkblue8.Rd index 614b66a2..eb0c8ca1 100644 --- a/man/grattan_darkblue8.Rd +++ b/man/grattan_darkblue8.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkblue8} \alias{grattan_darkblue8} -\title{Hex code for the colour: Grattan Dark Blue [tint 8]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkblue8 } \description{ -#EAF1FA +' } \keyword{datasets} diff --git a/man/grattan_darkgrey.Rd b/man/grattan_darkgrey.Rd index 1cfa084a..c57920ba 100644 --- a/man/grattan_darkgrey.Rd +++ b/man/grattan_darkgrey.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkgrey} \alias{grattan_darkgrey} -\title{Hex code for the colour: Grattan Dark Grey} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkgrey } \description{ -#575757 +' } \keyword{datasets} diff --git a/man/grattan_darkgrey1.Rd b/man/grattan_darkgrey1.Rd index 1927958c..40a6da47 100644 --- a/man/grattan_darkgrey1.Rd +++ b/man/grattan_darkgrey1.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkgrey1} \alias{grattan_darkgrey1} -\title{Hex code for the colour: Grattan Dark Grey [tint 1]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkgrey1 } \description{ -#686868 +' } \keyword{datasets} diff --git a/man/grattan_darkgrey2.Rd b/man/grattan_darkgrey2.Rd index c9b3a17f..c3cc212d 100644 --- a/man/grattan_darkgrey2.Rd +++ b/man/grattan_darkgrey2.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkgrey2} \alias{grattan_darkgrey2} -\title{Hex code for the colour: Grattan Dark Grey [tint 2]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkgrey2 } \description{ -#797979 +' } \keyword{datasets} diff --git a/man/grattan_darkgrey3.Rd b/man/grattan_darkgrey3.Rd index 06252c8b..f433bda1 100644 --- a/man/grattan_darkgrey3.Rd +++ b/man/grattan_darkgrey3.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkgrey3} \alias{grattan_darkgrey3} -\title{Hex code for the colour: Grattan Dark Grey [tint 3]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkgrey3 } \description{ -#898989 +' } \keyword{datasets} diff --git a/man/grattan_darkgrey4.Rd b/man/grattan_darkgrey4.Rd index 609cd191..e79b2959 100644 --- a/man/grattan_darkgrey4.Rd +++ b/man/grattan_darkgrey4.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkgrey4} \alias{grattan_darkgrey4} -\title{Hex code for the colour: Grattan Dark Grey [tint 4]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkgrey4 } \description{ -#9A9A9A +' } \keyword{datasets} diff --git a/man/grattan_darkgrey5.Rd b/man/grattan_darkgrey5.Rd index bfe1c461..ac77b8c1 100644 --- a/man/grattan_darkgrey5.Rd +++ b/man/grattan_darkgrey5.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkgrey5} \alias{grattan_darkgrey5} -\title{Hex code for the colour: Grattan Dark Grey [tint 5]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkgrey5 } \description{ -#ABABAB +' } \keyword{datasets} diff --git a/man/grattan_darkgrey6.Rd b/man/grattan_darkgrey6.Rd index 356fa506..4d827fc1 100644 --- a/man/grattan_darkgrey6.Rd +++ b/man/grattan_darkgrey6.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkgrey6} \alias{grattan_darkgrey6} -\title{Hex code for the colour: Grattan Dark Grey [tint 6]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkgrey6 } \description{ -#BCBCBC +' } \keyword{datasets} diff --git a/man/grattan_darkgrey7.Rd b/man/grattan_darkgrey7.Rd index cf870a6b..176e079b 100644 --- a/man/grattan_darkgrey7.Rd +++ b/man/grattan_darkgrey7.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkgrey7} \alias{grattan_darkgrey7} -\title{Hex code for the colour: Grattan Dark Grey [tint 7]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkgrey7 } \description{ -#CDCDCD +' } \keyword{datasets} diff --git a/man/grattan_darkgrey8.Rd b/man/grattan_darkgrey8.Rd index be2a2904..8efd045f 100644 --- a/man/grattan_darkgrey8.Rd +++ b/man/grattan_darkgrey8.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkgrey8} \alias{grattan_darkgrey8} -\title{Hex code for the colour: Grattan Dark Grey [tint 8]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkgrey8 } \description{ -#DDDDDD +' } \keyword{datasets} diff --git a/man/grattan_darkorange.Rd b/man/grattan_darkorange.Rd index 26be1983..72bd6253 100644 --- a/man/grattan_darkorange.Rd +++ b/man/grattan_darkorange.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkorange} \alias{grattan_darkorange} -\title{Hex code for the colour: Grattan Dark Orange (carrot soup)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkorange } \description{ -#D4582A +' } \keyword{datasets} diff --git a/man/grattan_darkorange1.Rd b/man/grattan_darkorange1.Rd index 03159cd3..08c82d02 100644 --- a/man/grattan_darkorange1.Rd +++ b/man/grattan_darkorange1.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkorange1} \alias{grattan_darkorange1} -\title{Hex code for the colour: Grattan Dark Orange [tint 1]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkorange1 } \description{ -#D8693F +' } \keyword{datasets} diff --git a/man/grattan_darkorange2.Rd b/man/grattan_darkorange2.Rd index 4ca81093..f4525d24 100644 --- a/man/grattan_darkorange2.Rd +++ b/man/grattan_darkorange2.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkorange2} \alias{grattan_darkorange2} -\title{Hex code for the colour: Grattan Dark Orange [tint 2]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkorange2 } \description{ -#DD7955 +' } \keyword{datasets} diff --git a/man/grattan_darkorange3.Rd b/man/grattan_darkorange3.Rd index 174e6a18..521fd433 100644 --- a/man/grattan_darkorange3.Rd +++ b/man/grattan_darkorange3.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkorange3} \alias{grattan_darkorange3} -\title{Hex code for the colour: Grattan Dark Orange [tint 3]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkorange3 } \description{ -#E18A6A +' } \keyword{datasets} diff --git a/man/grattan_darkorange4.Rd b/man/grattan_darkorange4.Rd index 516f6eaf..f0322be0 100644 --- a/man/grattan_darkorange4.Rd +++ b/man/grattan_darkorange4.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkorange4} \alias{grattan_darkorange4} -\title{Hex code for the colour: Grattan Dark Orange [tint 4]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkorange4 } \description{ -#E59B7F +' } \keyword{datasets} diff --git a/man/grattan_darkorange5.Rd b/man/grattan_darkorange5.Rd index 6ec0eeb4..10c92cf0 100644 --- a/man/grattan_darkorange5.Rd +++ b/man/grattan_darkorange5.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkorange5} \alias{grattan_darkorange5} -\title{Hex code for the colour: Grattan Dark Orange [tint 5]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkorange5 } \description{ -#EAAC95 +' } \keyword{datasets} diff --git a/man/grattan_darkorange6.Rd b/man/grattan_darkorange6.Rd index 4fb8c2df..a5b72bb0 100644 --- a/man/grattan_darkorange6.Rd +++ b/man/grattan_darkorange6.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkorange6} \alias{grattan_darkorange6} -\title{Hex code for the colour: Grattan Dark Orange [tint 6]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkorange6 } \description{ -#EEBCAA +' } \keyword{datasets} diff --git a/man/grattan_darkorange7.Rd b/man/grattan_darkorange7.Rd index 13e214cc..3918f141 100644 --- a/man/grattan_darkorange7.Rd +++ b/man/grattan_darkorange7.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkorange7} \alias{grattan_darkorange7} -\title{Hex code for the colour: Grattan Dark Orange [tint 7]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkorange7 } \description{ -#F2CDBF +' } \keyword{datasets} diff --git a/man/grattan_darkorange8.Rd b/man/grattan_darkorange8.Rd index 8782da4c..f1b0ba9f 100644 --- a/man/grattan_darkorange8.Rd +++ b/man/grattan_darkorange8.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkorange8} \alias{grattan_darkorange8} -\title{Hex code for the colour: Grattan Dark Orange [tint 8]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkorange8 } \description{ -#F6DED4 +' } \keyword{datasets} diff --git a/man/grattan_darkorange_f.Rd b/man/grattan_darkorange_f.Rd deleted file mode 100644 index d3af40aa..00000000 --- a/man/grattan_darkorange_f.Rd +++ /dev/null @@ -1,17 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R -\docType{data} -\name{grattan_darkorange_f} -\alias{grattan_darkorange_f} -\title{!Legacy, deprecated! -Hex code for the faded colour: Grattan dark orange (faded)} -\format{ -An object of class \code{character} of length 1. -} -\usage{ -grattan_darkorange_f -} -\description{ -#DE815F -} -\keyword{datasets} diff --git a/man/grattan_darkred.Rd b/man/grattan_darkred.Rd index e7e7d64c..b958b287 100644 --- a/man/grattan_darkred.Rd +++ b/man/grattan_darkred.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkred} \alias{grattan_darkred} -\title{Hex code for the colour: Grattan Dark Red (kidney bean soup)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkred } \description{ -#621214 +' } \keyword{datasets} diff --git a/man/grattan_darkred1.Rd b/man/grattan_darkred1.Rd index 560d11d3..900b9a1d 100644 --- a/man/grattan_darkred1.Rd +++ b/man/grattan_darkred1.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkred1} \alias{grattan_darkred1} -\title{Hex code for the colour: Grattan Dark Red [tint 1]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkred1 } \description{ -#722A2C +' } \keyword{datasets} diff --git a/man/grattan_darkred2.Rd b/man/grattan_darkred2.Rd index 0ded2c0d..7d5aaf12 100644 --- a/man/grattan_darkred2.Rd +++ b/man/grattan_darkred2.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkred2} \alias{grattan_darkred2} -\title{Hex code for the colour: Grattan Dark Red [tint 2]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkred2 } \description{ -#814143 +' } \keyword{datasets} diff --git a/man/grattan_darkred3.Rd b/man/grattan_darkred3.Rd index 2efd39ac..97291f96 100644 --- a/man/grattan_darkred3.Rd +++ b/man/grattan_darkred3.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkred3} \alias{grattan_darkred3} -\title{Hex code for the colour: Grattan Dark Red [tint 3]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkred3 } \description{ -#91595B +' } \keyword{datasets} diff --git a/man/grattan_darkred4.Rd b/man/grattan_darkred4.Rd index 2b8e1dee..586df827 100644 --- a/man/grattan_darkred4.Rd +++ b/man/grattan_darkred4.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkred4} \alias{grattan_darkred4} -\title{Hex code for the colour: Grattan Dark Red [tint 4]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkred4 } \description{ -#A17172 +' } \keyword{datasets} diff --git a/man/grattan_darkred5.Rd b/man/grattan_darkred5.Rd index dee48e58..77e6054a 100644 --- a/man/grattan_darkred5.Rd +++ b/man/grattan_darkred5.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkred5} \alias{grattan_darkred5} -\title{Hex code for the colour: Grattan Dark Red [tint 5]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkred5 } \description{ -#B1898A +' } \keyword{datasets} diff --git a/man/grattan_darkred6.Rd b/man/grattan_darkred6.Rd index 65c033d5..b4136a2b 100644 --- a/man/grattan_darkred6.Rd +++ b/man/grattan_darkred6.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkred6} \alias{grattan_darkred6} -\title{Hex code for the colour: Grattan Dark Red [tint 6]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkred6 } \description{ -#C0A0A1 +' } \keyword{datasets} diff --git a/man/grattan_darkred7.Rd b/man/grattan_darkred7.Rd index 57742b12..945ccf2a 100644 --- a/man/grattan_darkred7.Rd +++ b/man/grattan_darkred7.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkred7} \alias{grattan_darkred7} -\title{Hex code for the colour: Grattan Dark Red [tint 7]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkred7 } \description{ -#D0B8B9 +' } \keyword{datasets} diff --git a/man/grattan_darkred8.Rd b/man/grattan_darkred8.Rd index 14834fc8..ecaa5b33 100644 --- a/man/grattan_darkred8.Rd +++ b/man/grattan_darkred8.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkred8} \alias{grattan_darkred8} -\title{Hex code for the colour: Grattan Dark Red [tint 8]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkred8 } \description{ -#E0D0D0 +' } \keyword{datasets} diff --git a/man/grattan_darkred_f.Rd b/man/grattan_darkred_f.Rd deleted file mode 100644 index fa324b10..00000000 --- a/man/grattan_darkred_f.Rd +++ /dev/null @@ -1,17 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R -\docType{data} -\name{grattan_darkred_f} -\alias{grattan_darkred_f} -\title{!Legacy, deprecated! -Hex code for the faded colour: Grattan dark red (faded)} -\format{ -An object of class \code{character} of length 1. -} -\usage{ -grattan_darkred_f -} -\description{ -#894D4E -} -\keyword{datasets} diff --git a/man/grattan_darkyellow.Rd b/man/grattan_darkyellow.Rd index d9c9bc59..973494f8 100644 --- a/man/grattan_darkyellow.Rd +++ b/man/grattan_darkyellow.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkyellow} \alias{grattan_darkyellow} -\title{Hex code for the colour: Grattan Dark Yellow (butternut pumpkin soup)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkyellow } \description{ -#FFC35A +' } \keyword{datasets} diff --git a/man/grattan_darkyellow1.Rd b/man/grattan_darkyellow1.Rd index 25411cfd..41c3d112 100644 --- a/man/grattan_darkyellow1.Rd +++ b/man/grattan_darkyellow1.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkyellow1} \alias{grattan_darkyellow1} -\title{Hex code for the colour: Grattan Dark Yellow [tint 1]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkyellow1 } \description{ -#FFC96B +' } \keyword{datasets} diff --git a/man/grattan_darkyellow2.Rd b/man/grattan_darkyellow2.Rd index 059296b4..799e59eb 100644 --- a/man/grattan_darkyellow2.Rd +++ b/man/grattan_darkyellow2.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkyellow2} \alias{grattan_darkyellow2} -\title{Hex code for the colour: Grattan Dark Yellow [tint 2]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkyellow2 } \description{ -#FFCF7B +' } \keyword{datasets} diff --git a/man/grattan_darkyellow3.Rd b/man/grattan_darkyellow3.Rd index 5591f2be..11a83f36 100644 --- a/man/grattan_darkyellow3.Rd +++ b/man/grattan_darkyellow3.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkyellow3} \alias{grattan_darkyellow3} -\title{Hex code for the colour: Grattan Dark Yellow [tint 3]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkyellow3 } \description{ -#FFD58C +' } \keyword{datasets} diff --git a/man/grattan_darkyellow4.Rd b/man/grattan_darkyellow4.Rd index 7ecd31f5..559ae3b2 100644 --- a/man/grattan_darkyellow4.Rd +++ b/man/grattan_darkyellow4.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkyellow4} \alias{grattan_darkyellow4} -\title{Hex code for the colour: Grattan Dark Yellow [tint 4]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkyellow4 } \description{ -#FFDB9C +' } \keyword{datasets} diff --git a/man/grattan_darkyellow5.Rd b/man/grattan_darkyellow5.Rd index 68364616..208287f4 100644 --- a/man/grattan_darkyellow5.Rd +++ b/man/grattan_darkyellow5.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkyellow5} \alias{grattan_darkyellow5} -\title{Hex code for the colour: Grattan Dark Yellow [tint 5]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkyellow5 } \description{ -#FFE1AD +' } \keyword{datasets} diff --git a/man/grattan_darkyellow6.Rd b/man/grattan_darkyellow6.Rd index 02dca6e8..ecef2c98 100644 --- a/man/grattan_darkyellow6.Rd +++ b/man/grattan_darkyellow6.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkyellow6} \alias{grattan_darkyellow6} -\title{Hex code for the colour: Grattan Dark Yellow [tint 6]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkyellow6 } \description{ -#FFE7BD +' } \keyword{datasets} diff --git a/man/grattan_darkyellow7.Rd b/man/grattan_darkyellow7.Rd index 144b25f5..4900dca6 100644 --- a/man/grattan_darkyellow7.Rd +++ b/man/grattan_darkyellow7.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkyellow7} \alias{grattan_darkyellow7} -\title{Hex code for the colour: Grattan Dark Yellow [tint 7]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkyellow7 } \description{ -#FFEDCE +' } \keyword{datasets} diff --git a/man/grattan_darkyellow8.Rd b/man/grattan_darkyellow8.Rd index 9dce1370..351c4b10 100644 --- a/man/grattan_darkyellow8.Rd +++ b/man/grattan_darkyellow8.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_darkyellow8} \alias{grattan_darkyellow8} -\title{Hex code for the colour: Grattan Dark Yellow [tint 8]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_darkyellow8 } \description{ -#FFF3DE +' } \keyword{datasets} diff --git a/man/grattan_grey1.Rd b/man/grattan_grey1.Rd index 37c659d0..2df75607 100644 --- a/man/grattan_grey1.Rd +++ b/man/grattan_grey1.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_grey1} \alias{grattan_grey1} -\title{Hex code for the colour: Grattan grey 1 (truffle soup)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_grey1 } \description{ -#D9D9D9 +' } \keyword{datasets} diff --git a/man/grattan_grey2.Rd b/man/grattan_grey2.Rd index 3160e899..ce208e09 100644 --- a/man/grattan_grey2.Rd +++ b/man/grattan_grey2.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_grey2} \alias{grattan_grey2} -\title{Hex code for the colour: Grattan grey 2 (cream of mushroom soup)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_grey2 } \description{ -#AEAEAE +' } \keyword{datasets} diff --git a/man/grattan_grey3.Rd b/man/grattan_grey3.Rd index a0659ef5..4efb3bc8 100644 --- a/man/grattan_grey3.Rd +++ b/man/grattan_grey3.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_grey3} \alias{grattan_grey3} -\title{Hex code for the colour: Grattan grey 3 (morel mushroom soup)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_grey3 } \description{ -#828282 +' } \keyword{datasets} diff --git a/man/grattan_grey4.Rd b/man/grattan_grey4.Rd index 9c63497f..8885b147 100644 --- a/man/grattan_grey4.Rd +++ b/man/grattan_grey4.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_grey4} \alias{grattan_grey4} -\title{Hex code for the colour: Grattan grey 4 (shiitake mushroom soup)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_grey4 } \description{ -#575757 +' } \keyword{datasets} diff --git a/man/grattan_grey5.Rd b/man/grattan_grey5.Rd index b3964284..8fd61c71 100644 --- a/man/grattan_grey5.Rd +++ b/man/grattan_grey5.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_grey5} \alias{grattan_grey5} -\title{Hex code for the colour: Grattan grey 5 (blackbean soup)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_grey5 } \description{ -#2B2B2B +' } \keyword{datasets} diff --git a/man/grattan_grey_alpha.Rd b/man/grattan_grey_alpha.Rd index a4d5ed73..b4c3cc81 100644 --- a/man/grattan_grey_alpha.Rd +++ b/man/grattan_grey_alpha.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_grey_alpha} \alias{grattan_grey_alpha} -\title{Hex code for the colour: Grattan 'forecast shading' grey} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_grey_alpha } \description{ -#E1E3E5 +' } \keyword{datasets} diff --git a/man/grattan_grey_title.Rd b/man/grattan_grey_title.Rd index 5274a71b..1463e90f 100644 --- a/man/grattan_grey_title.Rd +++ b/man/grattan_grey_title.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_grey_title} \alias{grattan_grey_title} -\title{Hex code for the colour: Grattan title grey} +\title{grattan_grey_title} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_grey_title } \description{ -#6A737B +grattan_grey_title } \keyword{datasets} diff --git a/man/grattan_gridlinegrey.Rd b/man/grattan_gridlinegrey.Rd index 816b3604..61714608 100644 --- a/man/grattan_gridlinegrey.Rd +++ b/man/grattan_gridlinegrey.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_gridlinegrey} \alias{grattan_gridlinegrey} -\title{Hex code for the grey used for gridlines in Grattan charts} +\title{grattan_gridlinegrey} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_gridlinegrey } \description{ -#C3C7CB +grattan_gridlinegrey } \keyword{datasets} diff --git a/man/grattan_lightblue.Rd b/man/grattan_lightblue.Rd index 76952131..9727c3bb 100644 --- a/man/grattan_lightblue.Rd +++ b/man/grattan_lightblue.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightblue} \alias{grattan_lightblue} -\title{Hex code for the colour: Grattan Light Blue} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightblue } \description{ -#A3C7DF +' } \keyword{datasets} diff --git a/man/grattan_lightblue1.Rd b/man/grattan_lightblue1.Rd index 3c0e12df..2b58d543 100644 --- a/man/grattan_lightblue1.Rd +++ b/man/grattan_lightblue1.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightblue1} \alias{grattan_lightblue1} -\title{Hex code for the colour: Grattan Light Blue [tint 1]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightblue1 } \description{ -#ACCDE2 +' } \keyword{datasets} diff --git a/man/grattan_lightblue2.Rd b/man/grattan_lightblue2.Rd index 03a53bab..b96bc735 100644 --- a/man/grattan_lightblue2.Rd +++ b/man/grattan_lightblue2.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightblue2} \alias{grattan_lightblue2} -\title{Hex code for the colour: Grattan Light Blue [tint 2]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightblue2 } \description{ -#B5D2E5 +' } \keyword{datasets} diff --git a/man/grattan_lightblue3.Rd b/man/grattan_lightblue3.Rd index 000ab07d..9bc1fe75 100644 --- a/man/grattan_lightblue3.Rd +++ b/man/grattan_lightblue3.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightblue3} \alias{grattan_lightblue3} -\title{Hex code for the colour: Grattan Light Blue [tint 3]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightblue3 } \description{ -#BFD8E9 +' } \keyword{datasets} diff --git a/man/grattan_lightblue4.Rd b/man/grattan_lightblue4.Rd index 6a4bfd46..e502c253 100644 --- a/man/grattan_lightblue4.Rd +++ b/man/grattan_lightblue4.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightblue4} \alias{grattan_lightblue4} -\title{Hex code for the colour: Grattan Light Blue [tint 4]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightblue4 } \description{ -#C8DDEC +' } \keyword{datasets} diff --git a/man/grattan_lightblue5.Rd b/man/grattan_lightblue5.Rd index 46601384..a8299a12 100644 --- a/man/grattan_lightblue5.Rd +++ b/man/grattan_lightblue5.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightblue5} \alias{grattan_lightblue5} -\title{Hex code for the colour: Grattan Light Blue [tint 5]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightblue5 } \description{ -#D1E3EF +' } \keyword{datasets} diff --git a/man/grattan_lightblue6.Rd b/man/grattan_lightblue6.Rd index 4477bad2..f073ff1e 100644 --- a/man/grattan_lightblue6.Rd +++ b/man/grattan_lightblue6.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightblue6} \alias{grattan_lightblue6} -\title{Hex code for the colour: Grattan Light Blue [tint 6]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightblue6 } \description{ -#DAE9F2 +' } \keyword{datasets} diff --git a/man/grattan_lightblue7.Rd b/man/grattan_lightblue7.Rd index 96ee936e..7c009404 100644 --- a/man/grattan_lightblue7.Rd +++ b/man/grattan_lightblue7.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightblue7} \alias{grattan_lightblue7} -\title{Hex code for the colour: Grattan Light Blue [tint 7]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightblue7 } \description{ -#E3EEF5 +' } \keyword{datasets} diff --git a/man/grattan_lightblue8.Rd b/man/grattan_lightblue8.Rd index 4f1d3685..b167747f 100644 --- a/man/grattan_lightblue8.Rd +++ b/man/grattan_lightblue8.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightblue8} \alias{grattan_lightblue8} -\title{Hex code for the colour: Grattan Light Blue [tint 8]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightblue8 } \description{ -#EDF4F9 +' } \keyword{datasets} diff --git a/man/grattan_lightgrey.Rd b/man/grattan_lightgrey.Rd index 84e8ad36..9024c28a 100644 --- a/man/grattan_lightgrey.Rd +++ b/man/grattan_lightgrey.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightgrey} \alias{grattan_lightgrey} -\title{Hex code for the colour: Grattan Light Grey} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightgrey } \description{ -#828282 +' } \keyword{datasets} diff --git a/man/grattan_lightgrey1.Rd b/man/grattan_lightgrey1.Rd index 06480a6e..2fcbb04f 100644 --- a/man/grattan_lightgrey1.Rd +++ b/man/grattan_lightgrey1.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightgrey1} \alias{grattan_lightgrey1} -\title{Hex code for the colour: Grattan Light Grey [tint 1]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightgrey1 } \description{ -#8F8F8F +' } \keyword{datasets} diff --git a/man/grattan_lightgrey2.Rd b/man/grattan_lightgrey2.Rd index 990f476e..43575f92 100644 --- a/man/grattan_lightgrey2.Rd +++ b/man/grattan_lightgrey2.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightgrey2} \alias{grattan_lightgrey2} -\title{Hex code for the colour: Grattan Light Grey [tint 2]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightgrey2 } \description{ -#9B9B9B +' } \keyword{datasets} diff --git a/man/grattan_lightgrey3.Rd b/man/grattan_lightgrey3.Rd index 5b2d6215..77c4a258 100644 --- a/man/grattan_lightgrey3.Rd +++ b/man/grattan_lightgrey3.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightgrey3} \alias{grattan_lightgrey3} -\title{Hex code for the colour: Grattan Light Grey [tint 3]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightgrey3 } \description{ -#A8A8A8 +' } \keyword{datasets} diff --git a/man/grattan_lightgrey4.Rd b/man/grattan_lightgrey4.Rd index 0c4abc8f..1bf25068 100644 --- a/man/grattan_lightgrey4.Rd +++ b/man/grattan_lightgrey4.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightgrey4} \alias{grattan_lightgrey4} -\title{Hex code for the colour: Grattan Light Grey [tint 4]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightgrey4 } \description{ -#B4B4B4 +' } \keyword{datasets} diff --git a/man/grattan_lightgrey5.Rd b/man/grattan_lightgrey5.Rd index 40ebd56d..5b9a84b1 100644 --- a/man/grattan_lightgrey5.Rd +++ b/man/grattan_lightgrey5.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightgrey5} \alias{grattan_lightgrey5} -\title{Hex code for the colour: Grattan Light Grey [tint 5]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightgrey5 } \description{ -#C1C1C1 +' } \keyword{datasets} diff --git a/man/grattan_lightgrey6.Rd b/man/grattan_lightgrey6.Rd index 703b8a89..bf7f1c5d 100644 --- a/man/grattan_lightgrey6.Rd +++ b/man/grattan_lightgrey6.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightgrey6} \alias{grattan_lightgrey6} -\title{Hex code for the colour: Grattan Light Grey [tint 6]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightgrey6 } \description{ -#CDCDCD +' } \keyword{datasets} diff --git a/man/grattan_lightgrey7.Rd b/man/grattan_lightgrey7.Rd index e245cd9b..9adca382 100644 --- a/man/grattan_lightgrey7.Rd +++ b/man/grattan_lightgrey7.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightgrey7} \alias{grattan_lightgrey7} -\title{Hex code for the colour: Grattan Light Grey [tint 7]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightgrey7 } \description{ -#DADADA +' } \keyword{datasets} diff --git a/man/grattan_lightgrey8.Rd b/man/grattan_lightgrey8.Rd index acc8abc7..97f1fbb0 100644 --- a/man/grattan_lightgrey8.Rd +++ b/man/grattan_lightgrey8.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightgrey8} \alias{grattan_lightgrey8} -\title{Hex code for the colour: Grattan Light Grey [tint 8]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightgrey8 } \description{ -#E6E6E6 +' } \keyword{datasets} diff --git a/man/grattan_lightorange.Rd b/man/grattan_lightorange.Rd index b2df1c7e..9c4c8467 100644 --- a/man/grattan_lightorange.Rd +++ b/man/grattan_lightorange.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightorange} \alias{grattan_lightorange} -\title{Hex code for the colour: Grattan Light Orange (sweet potato soup)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightorange } \description{ -#F68B33 +' } \keyword{datasets} diff --git a/man/grattan_lightorange1.Rd b/man/grattan_lightorange1.Rd index baf8aace..8f509727 100644 --- a/man/grattan_lightorange1.Rd +++ b/man/grattan_lightorange1.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightorange1} \alias{grattan_lightorange1} -\title{Hex code for the colour: Grattan Light Orange [tint 1]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightorange1 } \description{ -#F79747 +' } \keyword{datasets} diff --git a/man/grattan_lightorange2.Rd b/man/grattan_lightorange2.Rd index 6ffbc9ef..e580b18e 100644 --- a/man/grattan_lightorange2.Rd +++ b/man/grattan_lightorange2.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightorange2} \alias{grattan_lightorange2} -\title{Hex code for the colour: Grattan Light Orange [tint 2]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightorange2 } \description{ -#F8A25C +' } \keyword{datasets} diff --git a/man/grattan_lightorange3.Rd b/man/grattan_lightorange3.Rd index 309d91ed..08f5bb62 100644 --- a/man/grattan_lightorange3.Rd +++ b/man/grattan_lightorange3.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightorange3} \alias{grattan_lightorange3} -\title{Hex code for the colour: Grattan Light Orange [tint 3]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightorange3 } \description{ -#F9AE70 +' } \keyword{datasets} diff --git a/man/grattan_lightorange4.Rd b/man/grattan_lightorange4.Rd index 7ad53529..ac3cdc3e 100644 --- a/man/grattan_lightorange4.Rd +++ b/man/grattan_lightorange4.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightorange4} \alias{grattan_lightorange4} -\title{Hex code for the colour: Grattan Light Orange [tint 4]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightorange4 } \description{ -#FAB985 +' } \keyword{datasets} diff --git a/man/grattan_lightorange5.Rd b/man/grattan_lightorange5.Rd index 07775e50..f7573cd2 100644 --- a/man/grattan_lightorange5.Rd +++ b/man/grattan_lightorange5.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightorange5} \alias{grattan_lightorange5} -\title{Hex code for the colour: Grattan Light Orange [tint 5]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightorange5 } \description{ -#FBC599 +' } \keyword{datasets} diff --git a/man/grattan_lightorange6.Rd b/man/grattan_lightorange6.Rd index ddbb3e71..d709289f 100644 --- a/man/grattan_lightorange6.Rd +++ b/man/grattan_lightorange6.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightorange6} \alias{grattan_lightorange6} -\title{Hex code for the colour: Grattan Light Orange [tint 6]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightorange6 } \description{ -#FBD1AD +' } \keyword{datasets} diff --git a/man/grattan_lightorange7.Rd b/man/grattan_lightorange7.Rd index a402ecf2..a88c3b26 100644 --- a/man/grattan_lightorange7.Rd +++ b/man/grattan_lightorange7.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightorange7} \alias{grattan_lightorange7} -\title{Hex code for the colour: Grattan Light Orange [tint 7]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightorange7 } \description{ -#FCDCC2 +' } \keyword{datasets} diff --git a/man/grattan_lightorange8.Rd b/man/grattan_lightorange8.Rd index 7ca1b9b7..75a02cf3 100644 --- a/man/grattan_lightorange8.Rd +++ b/man/grattan_lightorange8.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightorange8} \alias{grattan_lightorange8} -\title{Hex code for the colour: Grattan Light Orange [tint 8]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightorange8 } \description{ -#FDE8D6 +' } \keyword{datasets} diff --git a/man/grattan_lightorange_f.Rd b/man/grattan_lightorange_f.Rd deleted file mode 100644 index 322ebc50..00000000 --- a/man/grattan_lightorange_f.Rd +++ /dev/null @@ -1,17 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R -\docType{data} -\name{grattan_lightorange_f} -\alias{grattan_lightorange_f} -\title{!Legacy, deprecated! -Hex code for the faded colour: Grattan light orange (faded)} -\format{ -An object of class \code{character} of length 1. -} -\usage{ -grattan_lightorange_f -} -\description{ -#F8A866 -} -\keyword{datasets} diff --git a/man/grattan_lightred.Rd b/man/grattan_lightred.Rd index c47cf967..6528d842 100644 --- a/man/grattan_lightred.Rd +++ b/man/grattan_lightred.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightred} \alias{grattan_lightred} -\title{Hex code for the colour: Grattan Light Red (tomato soup)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightred } \description{ -#A02226 +' } \keyword{datasets} diff --git a/man/grattan_lightred1.Rd b/man/grattan_lightred1.Rd index 6813b9f0..febf68d0 100644 --- a/man/grattan_lightred1.Rd +++ b/man/grattan_lightred1.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightred1} \alias{grattan_lightred1} -\title{Hex code for the colour: Grattan Light Red [tint 1]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightred1 } \description{ -#AA383C +' } \keyword{datasets} diff --git a/man/grattan_lightred2.Rd b/man/grattan_lightred2.Rd index efa0eb37..c5065e23 100644 --- a/man/grattan_lightred2.Rd +++ b/man/grattan_lightred2.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightred2} \alias{grattan_lightred2} -\title{Hex code for the colour: Grattan Light Red [tint 2]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightred2 } \description{ -#B34E51 +' } \keyword{datasets} diff --git a/man/grattan_lightred3.Rd b/man/grattan_lightred3.Rd index 1ee73021..4becb185 100644 --- a/man/grattan_lightred3.Rd +++ b/man/grattan_lightred3.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightred3} \alias{grattan_lightred3} -\title{Hex code for the colour: Grattan Light Red [tint 3]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightred3 } \description{ -#BD6467 +' } \keyword{datasets} diff --git a/man/grattan_lightred4.Rd b/man/grattan_lightred4.Rd index fe36aa40..962feb8a 100644 --- a/man/grattan_lightred4.Rd +++ b/man/grattan_lightred4.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightred4} \alias{grattan_lightred4} -\title{Hex code for the colour: Grattan Light Red [tint 4]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightred4 } \description{ -#C67A7D +' } \keyword{datasets} diff --git a/man/grattan_lightred5.Rd b/man/grattan_lightred5.Rd index 9207e322..0bc7537e 100644 --- a/man/grattan_lightred5.Rd +++ b/man/grattan_lightred5.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightred5} \alias{grattan_lightred5} -\title{Hex code for the colour: Grattan Light Red [tint 5]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightred5 } \description{ -#D09193 +' } \keyword{datasets} diff --git a/man/grattan_lightred6.Rd b/man/grattan_lightred6.Rd index d8bd0a60..6c2c9910 100644 --- a/man/grattan_lightred6.Rd +++ b/man/grattan_lightred6.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightred6} \alias{grattan_lightred6} -\title{Hex code for the colour: Grattan Light Red [tint 6]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightred6 } \description{ -#D9A7A8 +' } \keyword{datasets} diff --git a/man/grattan_lightred7.Rd b/man/grattan_lightred7.Rd index ad0c8d9a..d1d2c1c1 100644 --- a/man/grattan_lightred7.Rd +++ b/man/grattan_lightred7.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightred7} \alias{grattan_lightred7} -\title{Hex code for the colour: Grattan Light Red [tint 7]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightred7 } \description{ -#E3BDBE +' } \keyword{datasets} diff --git a/man/grattan_lightred8.Rd b/man/grattan_lightred8.Rd index f7fe5971..cad6a048 100644 --- a/man/grattan_lightred8.Rd +++ b/man/grattan_lightred8.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightred8} \alias{grattan_lightred8} -\title{Hex code for the colour: Grattan Light Red [tint 8]} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightred8 } \description{ -#ECD3D4 +' } \keyword{datasets} diff --git a/man/grattan_lightyellow.Rd b/man/grattan_lightyellow.Rd index cda74e85..9ac6785a 100644 --- a/man/grattan_lightyellow.Rd +++ b/man/grattan_lightyellow.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightyellow} \alias{grattan_lightyellow} -\title{Hex code for the colour: Grattan Light Yellow (corn chowder)} +\title{grattan_lightyellow} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightyellow } \description{ -#FFE07F +grattan_lightyellow } \keyword{datasets} diff --git a/man/grattan_lightyellow1.Rd b/man/grattan_lightyellow1.Rd index 95954438..b8424d7e 100644 --- a/man/grattan_lightyellow1.Rd +++ b/man/grattan_lightyellow1.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightyellow1} \alias{grattan_lightyellow1} -\title{Hex code for the colour: Grattan Light Yellow [tint 1]} +\title{grattan_lightyellow1} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightyellow1 } \description{ -#FFE38C +grattan_lightyellow1 } \keyword{datasets} diff --git a/man/grattan_lightyellow2.Rd b/man/grattan_lightyellow2.Rd index 29bf4db3..c32098b8 100644 --- a/man/grattan_lightyellow2.Rd +++ b/man/grattan_lightyellow2.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightyellow2} \alias{grattan_lightyellow2} -\title{Hex code for the colour: Grattan Light Yellow [tint 2]} +\title{grattan_lightyellow2} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightyellow2 } \description{ -#FFE699 +grattan_lightyellow2 } \keyword{datasets} diff --git a/man/grattan_lightyellow3.Rd b/man/grattan_lightyellow3.Rd index c88b3e40..bc7c386a 100644 --- a/man/grattan_lightyellow3.Rd +++ b/man/grattan_lightyellow3.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightyellow3} \alias{grattan_lightyellow3} -\title{Hex code for the colour: Grattan Light Yellow [tint 3]} +\title{grattan_lightyellow3} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightyellow3 } \description{ -#FFE9A5 +grattan_lightyellow3 } \keyword{datasets} diff --git a/man/grattan_lightyellow4.Rd b/man/grattan_lightyellow4.Rd index 4ccdcbfc..16cda135 100644 --- a/man/grattan_lightyellow4.Rd +++ b/man/grattan_lightyellow4.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightyellow4} \alias{grattan_lightyellow4} -\title{Hex code for the colour: Grattan Light Yellow [tint 4]} +\title{grattan_lightyellow4} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightyellow4 } \description{ -#FFECB2 +grattan_lightyellow4 } \keyword{datasets} diff --git a/man/grattan_lightyellow5.Rd b/man/grattan_lightyellow5.Rd index 7ff1c396..a154c0ed 100644 --- a/man/grattan_lightyellow5.Rd +++ b/man/grattan_lightyellow5.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightyellow5} \alias{grattan_lightyellow5} -\title{Hex code for the colour: Grattan Light Yellow [tint 5]} +\title{grattan_lightyellow5} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightyellow5 } \description{ -#FFF0BF +grattan_lightyellow5 } \keyword{datasets} diff --git a/man/grattan_lightyellow6.Rd b/man/grattan_lightyellow6.Rd index d1105904..389ec933 100644 --- a/man/grattan_lightyellow6.Rd +++ b/man/grattan_lightyellow6.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightyellow6} \alias{grattan_lightyellow6} -\title{Hex code for the colour: Grattan Light Yellow [tint 6]} +\title{grattan_lightyellow6} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightyellow6 } \description{ -#FFF3CC +grattan_lightyellow6 } \keyword{datasets} diff --git a/man/grattan_lightyellow7.Rd b/man/grattan_lightyellow7.Rd index 0a23313a..64404de5 100644 --- a/man/grattan_lightyellow7.Rd +++ b/man/grattan_lightyellow7.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightyellow7} \alias{grattan_lightyellow7} -\title{Hex code for the colour: Grattan Light Yellow [tint 7]} +\title{grattan_lightyellow7} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightyellow7 } \description{ -#FFF6D9 +grattan_lightyellow7 } \keyword{datasets} diff --git a/man/grattan_lightyellow8.Rd b/man/grattan_lightyellow8.Rd index db17ca2d..da44f600 100644 --- a/man/grattan_lightyellow8.Rd +++ b/man/grattan_lightyellow8.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_lightyellow8} \alias{grattan_lightyellow8} -\title{Hex code for the colour: Grattan Light Yellow [tint 8]} +\title{grattan_lightyellow8} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_lightyellow8 } \description{ -#FFF9E5 +grattan_lightyellow8 } \keyword{datasets} diff --git a/man/grattan_lightyellow_f.Rd b/man/grattan_lightyellow_f.Rd deleted file mode 100644 index aae3bd67..00000000 --- a/man/grattan_lightyellow_f.Rd +++ /dev/null @@ -1,17 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R -\docType{data} -\name{grattan_lightyellow_f} -\alias{grattan_lightyellow_f} -\title{!Legacy, deprecated! -Hex code for the faded colour: Grattan light yellow (faded)} -\format{ -An object of class \code{character} of length 1. -} -\usage{ -grattan_lightyellow_f -} -\description{ -#FFE79F -} -\keyword{datasets} diff --git a/man/grattan_orange.Rd b/man/grattan_orange.Rd index 9facfcfd..d7b5b1a5 100644 --- a/man/grattan_orange.Rd +++ b/man/grattan_orange.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_orange} \alias{grattan_orange} -\title{Hex code for the colour: Grattan Orange (alias for Grattan Light Orange)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_orange } \description{ -#F68B33 +' } \keyword{datasets} diff --git a/man/grattan_orange1.Rd b/man/grattan_orange1.Rd index 718784dc..b200ca83 100644 --- a/man/grattan_orange1.Rd +++ b/man/grattan_orange1.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_orange1} \alias{grattan_orange1} -\title{Hex code for the colour: Grattan Orange [tint 1] (alias for Grattan Light Orange1)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_orange1 } \description{ -#F79747 +' } \keyword{datasets} diff --git a/man/grattan_orange2.Rd b/man/grattan_orange2.Rd index 8612c8a2..236fc144 100644 --- a/man/grattan_orange2.Rd +++ b/man/grattan_orange2.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_orange2} \alias{grattan_orange2} -\title{Hex code for the colour: Grattan Orange [tint 2] (alias for Grattan Light Orange2)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_orange2 } \description{ -#F8A25C +' } \keyword{datasets} diff --git a/man/grattan_orange3.Rd b/man/grattan_orange3.Rd index f23209e3..9a55b3be 100644 --- a/man/grattan_orange3.Rd +++ b/man/grattan_orange3.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_orange3} \alias{grattan_orange3} -\title{Hex code for the colour: Grattan Orange [tint 3] (alias for Grattan Light Orange3)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_orange3 } \description{ -#F9AE70 +' } \keyword{datasets} diff --git a/man/grattan_orange4.Rd b/man/grattan_orange4.Rd index ecbd021a..55a8283b 100644 --- a/man/grattan_orange4.Rd +++ b/man/grattan_orange4.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_orange4} \alias{grattan_orange4} -\title{Hex code for the colour: Grattan Orange [tint 4] (alias for Grattan Light Orange4)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_orange4 } \description{ -#FAB985 +' } \keyword{datasets} diff --git a/man/grattan_orange5.Rd b/man/grattan_orange5.Rd index e3b15e7a..08127b9e 100644 --- a/man/grattan_orange5.Rd +++ b/man/grattan_orange5.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_orange5} \alias{grattan_orange5} -\title{Hex code for the colour: Grattan Orange [tint 5] (alias for Grattan Light Orange5)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_orange5 } \description{ -#FBC599 +' } \keyword{datasets} diff --git a/man/grattan_orange6.Rd b/man/grattan_orange6.Rd index 561d1108..c3b26efe 100644 --- a/man/grattan_orange6.Rd +++ b/man/grattan_orange6.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_orange6} \alias{grattan_orange6} -\title{Hex code for the colour: Grattan Orange [tint 6] (alias for Grattan Light Orange6)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_orange6 } \description{ -#FBD1AD +' } \keyword{datasets} diff --git a/man/grattan_orange7.Rd b/man/grattan_orange7.Rd index 8ea2fb58..cbd7459c 100644 --- a/man/grattan_orange7.Rd +++ b/man/grattan_orange7.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_orange7} \alias{grattan_orange7} -\title{Hex code for the colour: Grattan Orange [tint 7] (alias for Grattan Light Orange7)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_orange7 } \description{ -#FCDCC2 +' } \keyword{datasets} diff --git a/man/grattan_orange8.Rd b/man/grattan_orange8.Rd index 1fb359f3..a2c3c883 100644 --- a/man/grattan_orange8.Rd +++ b/man/grattan_orange8.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_orange8} \alias{grattan_orange8} -\title{Hex code for the colour: Grattan Orange [tint 8] (alias for Grattan Light Orange8)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_orange8 } \description{ -#FDE8D6 +' } \keyword{datasets} diff --git a/man/grattan_orange_alpha.Rd b/man/grattan_orange_alpha.Rd index 7c91bbf0..605e2e5a 100644 --- a/man/grattan_orange_alpha.Rd +++ b/man/grattan_orange_alpha.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_orange_alpha} \alias{grattan_orange_alpha} -\title{Hex code for the colour used for Grattan box backgrounds (orange alpha)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_orange_alpha } \description{ -#FEF0DE +' } \keyword{datasets} diff --git a/man/grattan_orange_f.Rd b/man/grattan_orange_f.Rd deleted file mode 100644 index 2910db1d..00000000 --- a/man/grattan_orange_f.Rd +++ /dev/null @@ -1,17 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R -\docType{data} -\name{grattan_orange_f} -\alias{grattan_orange_f} -\title{!Legacy, deprecated! -Hex code for the faded colour: Grattan light orange (faded)} -\format{ -An object of class \code{character} of length 1. -} -\usage{ -grattan_orange_f -} -\description{ -#F8A866 -} -\keyword{datasets} diff --git a/man/grattan_palette_set.Rd b/man/grattan_palette_set.Rd index 3f46939b..2ea9cbe9 100644 --- a/man/grattan_palette_set.Rd +++ b/man/grattan_palette_set.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_palette_set} \alias{grattan_palette_set} diff --git a/man/grattan_palettes.Rd b/man/grattan_palettes.Rd new file mode 100644 index 00000000..d33bfcd6 --- /dev/null +++ b/man/grattan_palettes.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/grattan_pal.R +\docType{data} +\name{grattan_palettes} +\alias{grattan_palettes} +\title{Predefined grattan colours combined into palettes} +\format{ +An object of class \code{list} of length 3. +} +\usage{ +grattan_palettes +} +\description{ +This is a list of grattan colours combined into palettes. The palettes are used +for different plots and maps. +} +\keyword{datasets} diff --git a/man/grattan_red.Rd b/man/grattan_red.Rd index 8d812242..da3997f7 100644 --- a/man/grattan_red.Rd +++ b/man/grattan_red.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_red} \alias{grattan_red} -\title{Hex code for the colour: Grattan Red (alias for Grattan Light Red)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_red } \description{ -#A02226 +' } \keyword{datasets} diff --git a/man/grattan_red1.Rd b/man/grattan_red1.Rd index 38abbb22..f9b1c04a 100644 --- a/man/grattan_red1.Rd +++ b/man/grattan_red1.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_red1} \alias{grattan_red1} -\title{Hex code for the colour: Grattan Red [tint 1] (alias for Grattan Light Red1)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_red1 } \description{ -#AA383C +' } \keyword{datasets} diff --git a/man/grattan_red2.Rd b/man/grattan_red2.Rd index 0b643fbc..6a074685 100644 --- a/man/grattan_red2.Rd +++ b/man/grattan_red2.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_red2} \alias{grattan_red2} -\title{Hex code for the colour: Grattan Red [tint 2] (alias for Grattan Light Red2)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_red2 } \description{ -#B34E51 +' } \keyword{datasets} diff --git a/man/grattan_red3.Rd b/man/grattan_red3.Rd index 2404d9cd..61473e6a 100644 --- a/man/grattan_red3.Rd +++ b/man/grattan_red3.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_red3} \alias{grattan_red3} -\title{Hex code for the colour: Grattan Red [tint 3] (alias for Grattan Light Red3)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_red3 } \description{ -#BD6467 +' } \keyword{datasets} diff --git a/man/grattan_red4.Rd b/man/grattan_red4.Rd index 9bfd0385..8776d11d 100644 --- a/man/grattan_red4.Rd +++ b/man/grattan_red4.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_red4} \alias{grattan_red4} -\title{Hex code for the colour: Grattan Red [tint 4] (alias for Grattan Light Red4)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_red4 } \description{ -#C67A7D +' } \keyword{datasets} diff --git a/man/grattan_red5.Rd b/man/grattan_red5.Rd index b6090e14..6ee32d16 100644 --- a/man/grattan_red5.Rd +++ b/man/grattan_red5.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_red5} \alias{grattan_red5} -\title{Hex code for the colour: Grattan Red [tint 5] (alias for Grattan Light Red5)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_red5 } \description{ -#D09193 +' } \keyword{datasets} diff --git a/man/grattan_red6.Rd b/man/grattan_red6.Rd index e8e6efe3..6d15c5e6 100644 --- a/man/grattan_red6.Rd +++ b/man/grattan_red6.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_red6} \alias{grattan_red6} -\title{Hex code for the colour: Grattan Red [tint 6] (alias for Grattan Light Red6)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_red6 } \description{ -#D9A7A8 +' } \keyword{datasets} diff --git a/man/grattan_red7.Rd b/man/grattan_red7.Rd index f6f175e9..e7eb617c 100644 --- a/man/grattan_red7.Rd +++ b/man/grattan_red7.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_red7} \alias{grattan_red7} -\title{Hex code for the colour: Grattan Red [tint 7] (alias for Grattan Light Red7)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_red7 } \description{ -#E3BDBE +' } \keyword{datasets} diff --git a/man/grattan_red8.Rd b/man/grattan_red8.Rd index 24504b1e..00947503 100644 --- a/man/grattan_red8.Rd +++ b/man/grattan_red8.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_red8} \alias{grattan_red8} -\title{Hex code for the colour: Grattan Red [tint 8] (alias for Grattan Light Red8)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_red8 } \description{ -#ECD3D4 +' } \keyword{datasets} diff --git a/man/grattan_red_f.Rd b/man/grattan_red_f.Rd deleted file mode 100644 index 06d7998a..00000000 --- a/man/grattan_red_f.Rd +++ /dev/null @@ -1,17 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R -\docType{data} -\name{grattan_red_f} -\alias{grattan_red_f} -\title{!Legacy, deprecated! -Hex code for the faded colour: Grattan red (faded)} -\format{ -An object of class \code{character} of length 1. -} -\usage{ -grattan_red_f -} -\description{ -#B7595C -} -\keyword{datasets} diff --git a/man/grattan_yellow.Rd b/man/grattan_yellow.Rd index 86a42b35..8b785ca6 100644 --- a/man/grattan_yellow.Rd +++ b/man/grattan_yellow.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_yellow} \alias{grattan_yellow} -\title{Hex code for the colour: Grattan Yellow (alias for Grattan Dark Yellow)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_yellow } \description{ -#FFC35A +' } \keyword{datasets} diff --git a/man/grattan_yellow1.Rd b/man/grattan_yellow1.Rd index aec839b3..b2d4a7da 100644 --- a/man/grattan_yellow1.Rd +++ b/man/grattan_yellow1.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_yellow1} \alias{grattan_yellow1} -\title{Hex code for the colour: Grattan Yellow [tint 1] (alias for Grattan Dark Yellow1)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_yellow1 } \description{ -#FFC96B +' } \keyword{datasets} diff --git a/man/grattan_yellow2.Rd b/man/grattan_yellow2.Rd index 7babb82c..116a48b5 100644 --- a/man/grattan_yellow2.Rd +++ b/man/grattan_yellow2.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_yellow2} \alias{grattan_yellow2} -\title{Hex code for the colour: Grattan Yellow [tint 2] (alias for Grattan Dark Yellow2)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_yellow2 } \description{ -#FFCF7B +' } \keyword{datasets} diff --git a/man/grattan_yellow3.Rd b/man/grattan_yellow3.Rd index 80147a65..4e9124c2 100644 --- a/man/grattan_yellow3.Rd +++ b/man/grattan_yellow3.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_yellow3} \alias{grattan_yellow3} -\title{Hex code for the colour: Grattan Yellow [tint 3] (alias for Grattan Dark Yellow3)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_yellow3 } \description{ -#FFD58C +' } \keyword{datasets} diff --git a/man/grattan_yellow4.Rd b/man/grattan_yellow4.Rd index 59d9fac1..de24ef69 100644 --- a/man/grattan_yellow4.Rd +++ b/man/grattan_yellow4.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_yellow4} \alias{grattan_yellow4} -\title{Hex code for the colour: Grattan Yellow [tint 4] (alias for Grattan Dark Yellow4)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_yellow4 } \description{ -#FFDB9C +' } \keyword{datasets} diff --git a/man/grattan_yellow5.Rd b/man/grattan_yellow5.Rd index 5718e5c9..4adbd7dd 100644 --- a/man/grattan_yellow5.Rd +++ b/man/grattan_yellow5.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_yellow5} \alias{grattan_yellow5} -\title{Hex code for the colour: Grattan Yellow [tint 5] (alias for Grattan Dark Yellow5)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_yellow5 } \description{ -#FFE1AD +' } \keyword{datasets} diff --git a/man/grattan_yellow6.Rd b/man/grattan_yellow6.Rd index f37f4c9f..ede67775 100644 --- a/man/grattan_yellow6.Rd +++ b/man/grattan_yellow6.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_yellow6} \alias{grattan_yellow6} -\title{Hex code for the colour: Grattan Yellow [tint 6] (alias for Grattan Dark Yellow6)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_yellow6 } \description{ -#FFE7BD +' } \keyword{datasets} diff --git a/man/grattan_yellow7.Rd b/man/grattan_yellow7.Rd index d5bfecfd..002aa8eb 100644 --- a/man/grattan_yellow7.Rd +++ b/man/grattan_yellow7.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_yellow7} \alias{grattan_yellow7} -\title{Hex code for the colour: Grattan Yellow [tint 7] (alias for Grattan Dark Yellow7)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_yellow7 } \description{ -#FFEDCE +' } \keyword{datasets} diff --git a/man/grattan_yellow8.Rd b/man/grattan_yellow8.Rd index f2fc09a4..c00aeab3 100644 --- a/man/grattan_yellow8.Rd +++ b/man/grattan_yellow8.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R +% Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_yellow8} \alias{grattan_yellow8} -\title{Hex code for the colour: Grattan Yellow [tint 8] (alias for Grattan Dark Yellow8)} +\title{'} \format{ An object of class \code{character} of length 1. } @@ -11,6 +11,6 @@ An object of class \code{character} of length 1. grattan_yellow8 } \description{ -#FFF3DE +' } \keyword{datasets} diff --git a/man/grattan_yellow_f.Rd b/man/grattan_yellow_f.Rd deleted file mode 100644 index 521cff47..00000000 --- a/man/grattan_yellow_f.Rd +++ /dev/null @@ -1,17 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/colours.R -\docType{data} -\name{grattan_yellow_f} -\alias{grattan_yellow_f} -\title{!Legacy, deprecated! -Hex code for the faded colour: Grattan yellow (faded)} -\format{ -An object of class \code{character} of length 1. -} -\usage{ -grattan_yellow_f -} -\description{ -#FFD283 -} -\keyword{datasets} diff --git a/man/make_grattan_pal.Rd b/man/make_grattan_pal.Rd new file mode 100644 index 00000000..f5e6c8a5 --- /dev/null +++ b/man/make_grattan_pal.Rd @@ -0,0 +1,39 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/grattan_pal.R +\name{make_grattan_pal} +\alias{make_grattan_pal} +\title{Interpolate a grattan colour palette} +\usage{ +make_grattan_pal(palette = "sequential", reverse = FALSE, ...) +} +\arguments{ +\item{palette}{(character; default = \code{"graph"}) given name of a grattan +palette: \code{\link{grattan_palettes}}} + +\item{reverse}{(boolean; default = \code{FALSE}) indicating if palette should +be reverse} + +\item{...}{Additional arguments to pass to \code{colorRampPalette} see +details here \code{\link[grDevices]{colorRamp}}} +} +\description{ +This function takes a grattan colour palette and generates more colours from it, +so that there are enough to make your chart. +} +\details{ +The interpolation method is set to "spline" (the default is "linear") in an +attempt to reduce the number of vomit colours that get produced when +generating many colours. + +It returns a function that takes a single value and makes that many colours. +} +\examples{ + +ggplot2::ggplot(mtcars, ggplot2::aes(x = mpg, y = hp, colour = as.character(wt))) + + ggplot2::geom_point() + + ggplot2::scale_colour_manual(values = make_grattan_pal()(29)) + +} +\seealso{ +\code{\link{grattan_palettes}} +} diff --git a/man/make_grattan_pal_discrete.Rd b/man/make_grattan_pal_discrete.Rd new file mode 100644 index 00000000..3e7171d9 --- /dev/null +++ b/man/make_grattan_pal_discrete.Rd @@ -0,0 +1,20 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/grattan_pal.R +\name{make_grattan_pal_discrete} +\alias{make_grattan_pal_discrete} +\title{Create a grattan colour palette} +\usage{ +make_grattan_pal_discrete(n) +} +\arguments{ +\item{n}{how many colours to return} +} +\description{ +This function takes a the grattan graph colour palette and returns a vector of colours equal to n. +It is used in \code{\link{scale_colour_grattan}} and \code{\link{scale_fill_grattan}} to make the discrete +colour scale as the order of colours is specific in the grattan branding guides and so using an interpolated scale +does not work. +} +\seealso{ +\code{\link{grattan_palettes}} +} diff --git a/man/make_slide.Rd b/man/make_slide.Rd deleted file mode 100644 index 96007cc3..00000000 --- a/man/make_slide.Rd +++ /dev/null @@ -1,98 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/make_slide.R -\name{make_slide} -\alias{make_slide} -\alias{make_presentation} -\title{Create Powerpoint slides (deprecated)} -\usage{ -make_slide(graph = last_plot(), filename = NULL, path = ".", type = "16:9") - -make_presentation( - graphs, - filename = NULL, - path = ".", - type = "16:9", - title = "Title", - subtitle = "Subtitle" -) -} -\arguments{ -\item{graph}{The graph you want to include on your slide. Defaults to the -last plot (ggplot2::last_plot())} - -\item{filename}{The filename for your Powerpoint slide.} - -\item{path}{Path to the directory you wish to save your slide in. Defaults to -your working directory.} - -\item{type}{The type of Powerpoint slide to create; either "16:9" (the -default, for a 16:9 orientation slide), or "4:3".} - -\item{graphs}{A list of ggplot2 objects} - -\item{title}{Optional. The title of your presentation, if you want a title -slide.} - -\item{subtitle}{Optional. The subtitle of your presentation, if you want a -title slide.} -} -\description{ -These functions have been deprecated (removed) from the grattantheme - package. Use the new function `grattan_save_pptx()` instead. -} -\examples{ - -# To take a single ggplot2 graph and turn it into a slide: -# First, create your ggplot2 object. Include your subtitle, -# title, and caption with +labs() - -library(ggplot2) -library(grattantheme) - -ggplot(mtcars, aes(x = mpg, y = hp)) + - geom_point() + - theme_grattan() + - labs(title = "Long title goes here with a bunch of text lorem ipsum - Grattan blah blah sensible orange", - subtitle = "Subtitle", - caption = "Source: blah") - -# Now, create a Powerpoint slide with your graph in your working directory. -# By default, make_slide() will use the last plot you generated; -# you can specify a different object to use with the `graph` argument. - -\dontrun{make_slide(filename = "test.pptx")} - - -# To take multiple ggplot2 graphs and turn them into slides in a single -# presentation: -# First, create multiple ggplot2 objects. Include your subtitle, title, -# and caption with +labs() - -library(ggplot2) -library(grattantheme) - -graph1 <- ggplot(mtcars, aes(x = mpg, y = hp)) + - geom_point() + - theme_grattan() + - labs(title = "Title goes here with a bunch of text lorem ipsum", - subtitle = "Subtitle", - caption = "Source: blah") - -graph2 <- ggplot(mtcars, aes(x = mpg, y = hp)) + - geom_col() + - theme_grattan() + - labs(title = "This is another graph to go on the second slide", - subtitle = "Units go here", - caption = "Source: mtcars.") - -# Now combine your two graphs together in a list: - -graphs <- list(graph1, graph2) - -# Now, create a Powerpoint presentation with one -# slide per graph in your list: - -\dontrun{make_presentation(graphs, filename = "test.pptx")} - -} diff --git a/man/plot_opts_grattan.Rd b/man/plot_opts_grattan.Rd new file mode 100644 index 00000000..c73dbe11 --- /dev/null +++ b/man/plot_opts_grattan.Rd @@ -0,0 +1,16 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/z_default_aesthetics.R +\docType{data} +\name{plot_opts_grattan} +\alias{plot_opts_grattan} +\title{A list of plot options reflecting the Grattan brand} +\format{ +An object of class \code{list} of length 4. +} +\usage{ +plot_opts_grattan +} +\description{ +A list of plot options reflecting the Grattan brand +} +\keyword{datasets} diff --git a/man/plot_opts_vanilla.Rd b/man/plot_opts_vanilla.Rd new file mode 100644 index 00000000..3f8ec5be --- /dev/null +++ b/man/plot_opts_vanilla.Rd @@ -0,0 +1,16 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/z_default_aesthetics.R +\docType{data} +\name{plot_opts_vanilla} +\alias{plot_opts_vanilla} +\title{The vanilla plotting options} +\format{ +An object of class \code{list} of length 4. +} +\usage{ +plot_opts_vanilla +} +\description{ +These options restore the vanilla ggplot2 colours options for the R session. +} +\keyword{datasets} diff --git a/man/register_palette.Rd b/man/register_palette.Rd new file mode 100644 index 00000000..36f3f4e9 --- /dev/null +++ b/man/register_palette.Rd @@ -0,0 +1,13 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/grattan_pal.R +\name{register_palette} +\alias{register_palette} +\title{Register the option for which palette to use.} +\usage{ +register_palette() +} +\description{ +Grattan now has an old palette and a new palette. Depending which is needed users can +set options("grattan_palette" = "old") to have the colours map to the old colours. Otherwise the colours +default to the new colours. +} diff --git a/man/return_script_and_chart_location.Rd b/man/return_script_and_chart_location.Rd new file mode 100644 index 00000000..25c70e40 --- /dev/null +++ b/man/return_script_and_chart_location.Rd @@ -0,0 +1,18 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/grattan_save_pptx.R +\name{return_script_and_chart_location} +\alias{return_script_and_chart_location} +\title{Return a charter vector of the filepath of the script and powerpoint location} +\usage{ +return_script_and_chart_location(filename) +} +\arguments{ +\item{filename}{the filename of the powerpoint location} +} +\value{ +a character +} +\description{ +An internal function used in `add_graph_to_pptx` to add the location of the script that +made a chart and the location where the chart is saved. +} diff --git a/man/scale_colour_grattan.Rd b/man/scale_colour_grattan.Rd new file mode 100644 index 00000000..a46a33c7 --- /dev/null +++ b/man/scale_colour_grattan.Rd @@ -0,0 +1,36 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/grattan_scales.R +\name{scale_colour_grattan} +\alias{scale_colour_grattan} +\alias{scale_fill_grattan} +\title{Scale constructor for grattan colours} +\usage{ +scale_colour_grattan(palette = NULL, discrete = FALSE, reverse = FALSE, ...) + +scale_fill_grattan(palette = NULL, discrete = FALSE, reverse = FALSE, ...) +} +\arguments{ +\item{palette}{Character name of palette in \code{grattan_palettes}} + +\item{discrete}{Boolean indicating whether colour aesthetic is discrete or +not} + +\item{reverse}{Boolean indicating whether the palette should be reversed} + +\item{...}{Additional arguments passed to \code{\link{discrete_scale}} or +\code{\link{scale_color_gradientn}}, used respectively when discrete is +TRUE or FALSE} +} +\description{ +If you get an error about not enough colours, try a different palette (such +as \code{graph}) or set \code{discrete = FALSE}. If you are plotting discrete colours +and need more than 10 colours, then you will have to make your own palette using +\code{\link{make_grattan_pal}}. +} +\section{Functions}{ +\itemize{ +\item \code{scale_colour_grattan()}: For colour scales + +\item \code{scale_fill_grattan()}: For fill scales + +}} diff --git a/man/set_aesthetics.Rd b/man/set_aesthetics.Rd new file mode 100644 index 00000000..2b1a549d --- /dev/null +++ b/man/set_aesthetics.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/z_default_aesthetics.R +\name{set_aesthetics} +\alias{set_aesthetics} +\title{Set \code{ggplot2} default aesthetics} +\usage{ +set_aesthetics(type) +} +\arguments{ +\item{type}{(character) Which aesthetics to use? One of "grattan" or "vanilla".} +} +\description{ +Sets global options for \code{ggplot2}. If \code{type = "grattan"}, grattan brand +elements (colours and fonts) will be used by default in ggplot. To restore +the defaults use \code{type = "vanilla"}. +} +\examples{ +\dontrun{ +set_aesthetics(type = "vanilla") +} +} diff --git a/tests/testthat.R b/tests/testthat.R index 7daaeb38..0771208c 100644 --- a/tests/testthat.R +++ b/tests/testthat.R @@ -2,3 +2,4 @@ library(testthat) library(grattantheme) test_check("grattantheme") + diff --git a/tests/testthat/_snaps/axis_ticks/flipped-bar-default.svg b/tests/testthat/_snaps/axis_ticks/flipped-bar-default.svg index 4d00665a..4fc11f9e 100644 --- a/tests/testthat/_snaps/axis_ticks/flipped-bar-default.svg +++ b/tests/testthat/_snaps/axis_ticks/flipped-bar-default.svg @@ -59,38 +59,38 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Cadillac Fleetwood diff --git a/tests/testthat/_snaps/axis_ticks/flipped-bar-with-axis-ticks-off.svg b/tests/testthat/_snaps/axis_ticks/flipped-bar-with-axis-ticks-off.svg index 1b614ef2..56e9a3fa 100644 --- a/tests/testthat/_snaps/axis_ticks/flipped-bar-with-axis-ticks-off.svg +++ b/tests/testthat/_snaps/axis_ticks/flipped-bar-with-axis-ticks-off.svg @@ -31,38 +31,38 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/testthat/_snaps/axis_ticks/flipped-bar-with-flipped-true.svg b/tests/testthat/_snaps/axis_ticks/flipped-bar-with-flipped-true.svg index ec914b3a..170628fd 100644 --- a/tests/testthat/_snaps/axis_ticks/flipped-bar-with-flipped-true.svg +++ b/tests/testthat/_snaps/axis_ticks/flipped-bar-with-flipped-true.svg @@ -31,38 +31,38 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/testthat/_snaps/axis_ticks/regular-bar-chart.svg b/tests/testthat/_snaps/axis_ticks/regular-bar-chart.svg index d361d546..18d40c70 100644 --- a/tests/testthat/_snaps/axis_ticks/regular-bar-chart.svg +++ b/tests/testthat/_snaps/axis_ticks/regular-bar-chart.svg @@ -31,38 +31,38 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 diff --git a/tests/testthat/_snaps/grattan_colours/plot-with-continuous-palette.svg b/tests/testthat/_snaps/grattan_colours/plot-with-continuous-palette.svg index 52334a47..649e7f06 100644 --- a/tests/testthat/_snaps/grattan_colours/plot-with-continuous-palette.svg +++ b/tests/testthat/_snaps/grattan_colours/plot-with-continuous-palette.svg @@ -27,38 +27,38 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -87,7 +87,7 @@ mpg cyl - + 100 150 200 diff --git a/tests/testthat/_snaps/grattan_colours/plot-with-fill-palette.svg b/tests/testthat/_snaps/grattan_colours/plot-with-fill-palette.svg index 201b3ab0..cfc93775 100644 --- a/tests/testthat/_snaps/grattan_colours/plot-with-fill-palette.svg +++ b/tests/testthat/_snaps/grattan_colours/plot-with-fill-palette.svg @@ -27,156 +27,156 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -197,7 +197,7 @@ Species Sepal.Length - + 5 6 7 diff --git a/tests/testthat/_snaps/grattan_colours/plot-with-three-colours.svg b/tests/testthat/_snaps/grattan_colours/plot-with-three-colours.svg index d637df79..132e3101 100644 --- a/tests/testthat/_snaps/grattan_colours/plot-with-three-colours.svg +++ b/tests/testthat/_snaps/grattan_colours/plot-with-three-colours.svg @@ -59,38 +59,38 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -117,11 +117,11 @@ factor(cyl) - + - + - + 4 6 8 diff --git a/tests/testthat/_snaps/with-vdiffr/coloured-plot.svg b/tests/testthat/_snaps/with-vdiffr/coloured-plot.svg index 9488c220..7a5e8321 100644 --- a/tests/testthat/_snaps/with-vdiffr/coloured-plot.svg +++ b/tests/testthat/_snaps/with-vdiffr/coloured-plot.svg @@ -67,36 +67,36 @@ - + - + - - - + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - + + 10 diff --git a/tests/testthat/default_height/default_height_fullslide.png b/tests/testthat/default_height/default_height_fullslide.png index a6c5867d..0ce1b3c1 100644 Binary files a/tests/testthat/default_height/default_height_fullslide.png and b/tests/testthat/default_height/default_height_fullslide.png differ diff --git a/tests/testthat/test_grattan-label.R b/tests/testthat/test-grattan-label.R similarity index 100% rename from tests/testthat/test_grattan-label.R rename to tests/testthat/test-grattan-label.R diff --git a/tests/testthat/test-grattan_arrow.R b/tests/testthat/test-grattan_arrow.R new file mode 100644 index 00000000..4e0dbc1f --- /dev/null +++ b/tests/testthat/test-grattan_arrow.R @@ -0,0 +1,8 @@ +test_that("grattan_arrow plot appears correct", { + +expect_equal( + grattan_arrow(), + grid::arrow(type = "closed", angle = 20, length = unit(0.5, "lines")) +) + +}) diff --git a/tests/testthat/test-grattan_colours.R b/tests/testthat/test-grattan_colours.R index fb807e40..5ccc1ce8 100644 --- a/tests/testthat/test-grattan_colours.R +++ b/tests/testthat/test-grattan_colours.R @@ -6,77 +6,42 @@ base_plot <- ggplot(mtcars, aes(x = mpg, y = hp)) + p <- base_plot + theme_grattan() + + test_that("grattan colour functions work as expected", { - expect_length(grattan_pal(), 6) - expect_length(grattan_pal(faded_level = 1), 6) - expect_length(grattan_pal(faded_level = 2), 6) - expect_length(grattan_pal(faded_level = 3), 6) - expect_length(grattan_pal(faded_level = 4), 6) - expect_length(grattan_pal(faded_level = 5), 6) - expect_length(grattan_pal(faded_level = 6), 6) - expect_length(grattan_pal(faded_level = 7), 6) - expect_length(grattan_pal(faded_level = 8), 6) - - expect_identical(grattan_pal(), grattan_pal(faded_level = 0)) - expect_false(identical(grattan_pal(), grattan_pal(faded_level = 1))) - - expect_length(grattan_pal(n = 1), 1) - expect_length(grattan_pal(n = 2), 2) - expect_length(grattan_pal(n = "2a"), 2) - expect_length(grattan_pal(n = 3), 3) - expect_length(grattan_pal(n = 4), 4) - expect_length(grattan_pal(n = 5), 5) - expect_length(grattan_pal(n = 6), 6) - expect_length(suppressWarnings(grattan_pal(n = 7)), 7) - expect_length(suppressWarnings(grattan_pal(n = 8)), 8) - expect_length(suppressWarnings(grattan_pal(n = 9)), 9) - expect_length(suppressWarnings(grattan_pal(n = 10)), 10) - expect_length(grattan_pal(n = 3, reverse = TRUE), 3) - - expect_length(grattan_pal(n = 1, faded_level = 1), 1) - expect_length(grattan_pal(n = 2, faded_level = 1), 2) - expect_length(grattan_pal(n = "2a", faded_level = 1), 2) - expect_length(grattan_pal(n = 3, faded_level = 1), 3) - expect_length(grattan_pal(n = 4, faded_level = 1), 4) - expect_length(grattan_pal(n = 5, faded_level = 1), 5) - expect_length(grattan_pal(n = 6, faded_level = 1), 6) - expect_length(suppressWarnings(grattan_pal(n = 7, faded_level = 1)), 7) - expect_length(suppressWarnings(grattan_pal(n = 8, faded_level = 1)), 8) - expect_length(suppressWarnings(grattan_pal(n = 9, faded_level = 1)), 9) - expect_length(suppressWarnings(grattan_pal(n = 10, faded_level = 1)), 10) - - expect_warning(grattan_pal(n = 10, faded = TRUE)) - - expect_error(grattan_pal(n = 11)) - expect_error(grattan_pal(n = 11, faded_level = 6)) - - expect_equal(grattan_pal(n = 5), - c(grattantheme::grattan_darkyellow, - grattantheme::grattan_lightorange, - grattantheme::grattan_darkorange, - grattantheme::grattan_lightred, - grattantheme::grattan_darkred)) - - expect_equal(grattan_pal(n = 5, faded_level = 4), - c(grattantheme::grattan_darkyellow4, - grattantheme::grattan_lightorange4, - grattantheme::grattan_darkorange4, - grattantheme::grattan_lightred4, - grattantheme::grattan_darkred4)) - - expect_s3_class(grattan_colour_manual(faded_level = 2), "ScaleDiscrete") - expect_s3_class(grattan_colour_manual(discrete = FALSE), "ScaleContinuous") + expect_length(make_grattan_pal()(6), 6) + expect_length(make_grattan_pal(reverse = TRUE)(6), 6) + expect_length(make_grattan_pal(palette = "graph")(6), 6) + expect_length(make_grattan_pal(palette = "diverging")(6), 6) + + expect_length(make_grattan_pal_discrete(6), 6) + expect_length(make_grattan_pal_discrete(10), 10) + + expect_error(make_grattan_pal_discrete(11)) + + expect_equal(make_grattan_pal_discrete(n = 5), + c(grattan_orange, + grattan_lightred, + grattan_darkyellow, + grattan_darkorange, + grattan_darkred + )) + + expect_s3_class(scale_colour_grattan(discrete = TRUE), "ScaleDiscrete") + expect_s3_class(scale_colour_grattan(), "ScaleContinuous") + expect_s3_class(scale_fill_grattan(discrete = TRUE), "ScaleDiscrete") + expect_s3_class(scale_fill_grattan(), "ScaleContinuous") plot_w_col <- base_plot + geom_point(aes(col = factor(cyl))) + - grattan_colour_manual(n = 3) + scale_colour_grattan(discrete = TRUE) expect_is(plot_w_col, "gg") plot_w_col_built <- ggplot_build(plot_w_col) - expect_equal(plot_w_col_built$data[[2]]$colour[1], "#F68B33") + expect_equal(plot_w_col_built$data[[2]]$colour[1], "#A1253E") expect_equal(length(unique(plot_w_col_built$data[[2]]$colour)), 3) @@ -89,7 +54,7 @@ test_that("grattan continuous palette functions work as expected (colour)", { plot_cont <- ggplot(mtcars, aes(x = mpg, y = cyl)) + geom_point(aes(col = hp)) + - grattan_colour_manual(discrete = FALSE) + scale_colour_grattan(discrete = FALSE) expect_is(plot_cont, "gg") @@ -97,7 +62,7 @@ test_that("grattan continuous palette functions work as expected (colour)", { expect_equal(length(unique(plot_cont_built$data[[1]]$colour)), 22) - expect_equal(plot_cont_built$data[[1]]$colour[1], "#CA4E29") + expect_equal(plot_cont_built$data[[1]]$colour[1], "#B04E37") vdiffr::expect_doppelganger("plot with continuous palette", plot_cont) @@ -111,7 +76,7 @@ test_that("grattan continuous palette functions work as expected (fill)", { plot_fill <- ggplot(iris, aes(x = Species, y = Sepal.Length, fill = Sepal.Length)) + geom_col() + - grattan_fill_manual(discrete = FALSE, palette = "full_f") + scale_fill_grattan(discrete = FALSE) expect_is(plot_fill, "gg") @@ -119,7 +84,7 @@ test_that("grattan continuous palette functions work as expected (fill)", { expect_equal(length(unique(plot_fill_built$data[[1]]$fill)), 35) - expect_equal(plot_fill_built$data[[1]]$fill[150], "#F29F64") + expect_equal(plot_fill_built$data[[1]]$fill[35], "#A34437") vdiffr::expect_doppelganger("plot with fill palette", plot_fill) diff --git a/tests/testthat/test-grattan_point_filled.R b/tests/testthat/test-grattan_point_filled.R index 4410c39c..c95dcecf 100644 --- a/tests/testthat/test-grattan_point_filled.R +++ b/tests/testthat/test-grattan_point_filled.R @@ -1,12 +1,3 @@ test_that("grattan_point_filled() returns expected output", { expect_is(grattan_point_filled(), "ggproto") - - expect_equal(grattan_point_filled(), - ggplot2::geom_point( - size = 3, - stroke = 1.5, - fill = "white", - shape = 21 - )) - }) diff --git a/tests/testthat/test-grattan_save.R b/tests/testthat/test-grattan_save.R index dd2a0502..fe4107be 100644 --- a/tests/testthat/test-grattan_save.R +++ b/tests/testthat/test-grattan_save.R @@ -4,7 +4,7 @@ library(openxlsx) test_plot <- ggplot(mtcars, aes(x = wt, y = mpg, col = factor(cyl))) + geom_point() + theme_grattan() + - grattan_colour_manual(n = 3) + + scale_colour_grattan(discrete = TRUE) + grattan_y_continuous(limits = c(0, 40)) + labs(x = "Weight", title = "Smaller cars get better mileage", @@ -14,13 +14,13 @@ test_plot <- ggplot(mtcars, aes(x = wt, y = mpg, col = factor(cyl))) + test_plot_nolabs <- ggplot(mtcars, aes(x = wt, y = mpg, col = factor(cyl))) + geom_point() + theme_grattan() + - grattan_colour_manual(n = 3) + + scale_colour_grattan(discrete = TRUE) + grattan_y_continuous(limits = c(0, 40)) test_plot_longlabs <- ggplot(mtcars, aes(x = wt, y = mpg, col = factor(cyl))) + geom_point() + theme_grattan() + - grattan_colour_manual(n = 3) + + scale_colour_grattan(discrete = TRUE) + grattan_y_continuous(limits = c(0, 40)) + labs(x = "Weight", title = "Smaller cars get better mileage Smaller cars get better mileage Smaller cars get better mileage Smaller cars get better mileage Smaller cars get better mileage Smaller cars get better mileage Smaller cars get better mileage", @@ -124,7 +124,6 @@ test_that("grattan_save() doesn't save chart data / PPTX when not requested", { expect_false(file.exists("../figs/grattan_save/test_plot/test_plot_blog_half.png")) expect_false(file.exists("../figs/grattan_save/test_plot/test_plot_fullslide_44.png")) - unlink("../figs/grattan_save", recursive = TRUE) unlink("../testthat/Rplots.pdf") }) @@ -200,12 +199,6 @@ test_that("grattan_save() height behaviour works as expected with fullslide char }) - - - - - - test_that("grattan_save() sends the right messages",{ expect_error( grattan_save(filename = "test_plot_normal_default_height.png", diff --git a/tests/testthat/test-grattan_save_pptx.R b/tests/testthat/test-grattan_save_pptx.R index 4c115818..9bf46d51 100644 --- a/tests/testthat/test-grattan_save_pptx.R +++ b/tests/testthat/test-grattan_save_pptx.R @@ -6,7 +6,8 @@ base_p1 <- mtcars %>% p1 <- base_p1 + labs(title = "My title", - subtitle = "My subtitle") + subtitle = "My subtitle", + caption = "Notes: notes. Source: source") p2 <- mtcars %>% ggplot(aes(x = mpg, y = wt)) + @@ -37,7 +38,7 @@ no_slides <- function(filename) { } test_that("create_pptx_shell creates an empty pptx document with the appropriate number of slides", { - skip_on_cran() + skip("Deprecated") # Plot argument to create_pptx_shell() must be a list of ggplot2 object(s) expect_error(create_pptx_shell(p1, @@ -62,10 +63,7 @@ test_that("add_graph_to_pptx adds ggplot2 object(s) to pptx shell", { skip_on_cran() - create_pptx_shell(list(p1), "temp.pptx", "fullslide_43") - on.exit(unlink("temp.pptx")) - - add_graph_to_pptx(list(p1), "temp.pptx", "fullslide_43") + add_graph_to_pptx(list(p1), "temp.pptx", "fullslide", num_slides = 1) expect_true(is_valid_pptx("temp.pptx")) x <- officer::read_pptx("temp.pptx") @@ -73,7 +71,8 @@ test_that("add_graph_to_pptx adds ggplot2 object(s) to pptx shell", { expect_identical(summ_x$text[1], "My title") expect_identical(summ_x$text[2], "My subtitle") - expect_identical(summ_x$text[3], "1015202530352345wtmpg") + expect_identical(summ_x$text[3], "Notes: notes.\nSource: source") + expect_identical(summ_x$text[4], "1015202530352345wtmpg") }) test_that("grattan_save_pptx works in various configurations", { diff --git a/tests/testthat/test-watermark.R b/tests/testthat/test-watermark.R index 66999d17..d30df4dc 100644 --- a/tests/testthat/test-watermark.R +++ b/tests/testthat/test-watermark.R @@ -12,6 +12,6 @@ test_that("watermark adds watermark", { expect_is(pw, "gg") - vdiffr::expect_doppelganger("plot with watermark", pw, path = "vdiffr-tests") + vdiffr::expect_doppelganger("plot with watermark", pw) }) diff --git a/tests/testthat/test/saved_plots.rda b/tests/testthat/test/saved_plots.rda index a8b9062c..a9205495 100644 Binary files a/tests/testthat/test/saved_plots.rda and b/tests/testthat/test/saved_plots.rda differ diff --git a/tests/testthat/test/test.xlsx b/tests/testthat/test/test.xlsx index a4c10609..172b1f37 100644 Binary files a/tests/testthat/test/test.xlsx and b/tests/testthat/test/test.xlsx differ diff --git a/tests/testthat/test/test_normal.pdf b/tests/testthat/test/test_normal.pdf index 54fec4f0..2b2dd62b 100644 Binary files a/tests/testthat/test/test_normal.pdf and b/tests/testthat/test/test_normal.pdf differ diff --git a/tests/testthat/test_grattan_arrow.R b/tests/testthat/test_grattan_arrow.R deleted file mode 100644 index 76d13252..00000000 --- a/tests/testthat/test_grattan_arrow.R +++ /dev/null @@ -1,30 +0,0 @@ -# Create a dataset -- mtcars with rownames as column - mt <- mtcars - mt$car <- rownames(mt) - - # Make a basic chart with the mtcars data - p <- ggplot(mt, aes(x = mpg, y = wt, label = car)) + - geom_point() + - theme_grattan() - -# Add a simple callout arrow to the chart, using geom_segment, with arrow = grattan_arrow() -garrow_chart <- p + -geom_segment(aes(x = 15, y = 2, xend = 19.5, yend = 2.74), - arrow = grattan_arrow(), - colour = grattan_red) - - -# Do the same but using the default arrow function with correct settings -arrow_chart <- p + - geom_segment(aes(x = 15, y = 2, xend = 19.5, yend = 2.74), - arrow = grid::arrow(type = "closed", angle = 20, length = unit(0.5, "lines")), - colour = grattan_red) - -test_that("grattan_arrow plot appears correct", { - -expect_equal( - garrow_chart, - arrow_chart -) - -}) diff --git a/vignettes/using_grattantheme.Rmd b/vignettes/using_grattantheme.Rmd index 03a824b7..8cdbcca0 100644 --- a/vignettes/using_grattantheme.Rmd +++ b/vignettes/using_grattantheme.Rmd @@ -121,51 +121,37 @@ We can call single colours: ```{r} plot + - geom_hline(yintercept = 3, colour = grattan_lightorange) + + geom_hline(yintercept = 3, colour = grattan_orange) + geom_vline(xintercept = 6, colour = grattan_darkorange) + theme_grattan() + grattan_y_continuous() ``` -We can also use the `grattan_fill_manual()` or `grattan_colour_manual()` functions to change the colours of our fill or colour _aesthetics_. These can be used for discrete/catagorical data (the default) or continuous data. +We can also use the `scale_fill_grattan()` or `scale_colour_grattan()` functions to change the colours of our fill or colour _aesthetics_. These can be used for discrete/catagorical data (the default) or continuous data. ### Discrete colours -In our example, we have five different trees each represented by a colour, so we set the number of colours to five: `grattan_fill_manual(n = 5)`: +In our example, we have three different flowers each represented by a colour. So we need to set `discrete = TRUE` ```{r} plot + theme_grattan() + grattan_y_continuous() + - grattan_colour_manual(3) + scale_colour_grattan(discrete = TRUE) ``` -We can reverse the order of the fill colours using the `reverse` argument: +Note that if you need more than 10 colours your chart will not render some of the data. You can set a manual theme using `make_grattan_pal` ```{r} -plot + - theme_grattan() + - grattan_y_continuous() + - grattan_colour_manual(3, reverse = TRUE) - +ggplot(mtcars, aes(x = mpg, y = hp, colour = as.character(wt))) + + geom_point() + + scale_colour_manual(values = make_grattan_pal()(29)) ``` -Note that if you do not specify _enough_ colours, will receive an error: - -```{r, eval = TRUE, error= TRUE, fig.show='hide'} -plot + - theme_grattan() + - grattan_y_continuous() + - grattan_colour_manual(2) -``` - -You won't receive an error if you specify _too many_ colours. `ggplot` will choose the first `n` colours it needs and ignore the rest. - - ### Continuous colours -`grattan_(colour|fill)_manual` includes an option for continuous colours: `discrete = FALSE`. +`scale_(colour|fill)_grattan` includes an option for continuous colours: `discrete = FALSE`. ```{r} plot2 <- ggplot(iris, @@ -173,51 +159,16 @@ plot2 <- ggplot(iris, y = Sepal.Width, colour = Sepal.Length)) + geom_point(size = 5) + - grattan_y_continuous() + + scale_y_continuous_grattan() + labs(x = "") -plot2 + - theme_grattan() + - grattan_colour_manual(discrete = FALSE) -``` - - -We can change the set of colours the continuous palette is generated from using the `palette` argument: - -```{r, fig.height=10, fig.width=10} -p_full <- plot2 + - theme_grattan() + - grattan_colour_manual(discrete = FALSE, palette = "full") - - -p_full_f <- plot2 + +plot_f <- plot2 + theme_grattan() + - grattan_colour_manual(discrete = FALSE, palette = "full_f") + scale_colour_grattan(discrete = FALSE) -p_dark <- plot2 + - theme_grattan() + - grattan_colour_manual(discrete = FALSE, palette = "dark") - - -p_light <- plot2 + - theme_grattan() + - grattan_colour_manual(discrete = FALSE, palette = "light") - -p_diverging <- plot2 + - theme_grattan() + - grattan_colour_manual(discrete = FALSE, palette = "diverging") - -p_grey <- plot2 + - theme_grattan() + - grattan_colour_manual(discrete = FALSE, palette = "grey") - - -gridExtra::grid.arrange(p_full, p_full_f, - p_dark, p_light, - p_diverging, p_grey) +plot_f ``` - ## Saving plots with `grattan_save` @@ -241,7 +192,7 @@ Now we can save our Grattan-formatted graph as a normally-formatted report chart ```{r} # Create and store the plot: -plot_final <- p_full_f + +plot_final <- plot_f + labs(title = "Iris plants are rad!", subtitle = "Width of sepal", x = "Length of sepal",