-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef0168f
commit 0d934c7
Showing
7 changed files
with
87 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ Package: ggredist | |
Title: Scales, Geometries, and Extensions of 'ggplot2' for Election Mapping | ||
Version: 0.0.2 | ||
Authors@R: c( | ||
person("Cory", "McCartan", email = "[email protected].edu", role = "aut"), | ||
person("Cory", "McCartan", email = "mccartan@psu.edu", role = "aut"), | ||
person("Christopher T.", "Kenny", email = "[email protected]", | ||
role = c("aut", "cre"), comment = c(ORCID = "0000-0002-9386-6860"))) | ||
Description: Provides 'ggplot2' extensions for political map making. Implements | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#' Alaska Color Scales for `ggplot2` | ||
#' | ||
#' @param ... Arguments passed on to [ggplot2::discrete_scale()] | ||
#' | ||
#' @return ggplot scale function | ||
#' | ||
#' @examples | ||
#' library(ggplot2) | ||
#' data(oregon) | ||
#' | ||
#' ggplot(oregon, aes(group = county)) + | ||
#' geom_district() + | ||
#' scale_fill_alaska() + | ||
#' theme_map() | ||
#' | ||
#' @concept colors | ||
#' @rdname scale_alaska | ||
#' @export | ||
scale_fill_alaska <- function(...) { | ||
ggplot2::discrete_scale(aesthetics = 'fill', scale_name = 'alaska', | ||
palette = palette::palette_function(ggredist$alaska), ...) | ||
} | ||
|
||
#' @rdname scale_alaska | ||
#' @concept colors | ||
#' @export | ||
scale_color_alaska <- function(...) { | ||
ggplot2::discrete_scale(aesthetics = 'color', scale_name = 'alaska', | ||
palette = palette::palette_function(ggredist$alaska), ...) | ||
} | ||
#' @rdname scale_alaska | ||
#' @concept colors | ||
#' @export | ||
scale_colour_alaska = scale_color_alaska |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.