Skip to content

Commit

Permalink
Merge pull request #17 from bcgov/new-theme
Browse files Browse the repository at this point in the history
Removing ggthemes:theme_foundation()
  • Loading branch information
stephhazlitt authored Nov 29, 2017
2 parents 386a37b + 2e18f57 commit 59f3ade
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
3 changes: 1 addition & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: envreportutils
Type: Package
Title: Utilities for common operations, mainly plotting
Version: 0.6.0.99999
Version: 0.6.2
Date: 2017-09-21
Authors@R: c(person("Andy", "Teucher", role = c("aut", "cre"), email =
"andy.teucher@gov.bc.ca"),
Expand All @@ -14,7 +14,6 @@ Depends:
extrafont (>= 0.17)
Imports:
ggplot2 (>= 2.2.0),
ggthemes (>= 3.2.0),
dplyr (>= 0.5.0),
lazyeval (>= 0.2.0),
rstudioapi (>= 0.6.0),
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export(theme_soe)
export(theme_soe_facet)
import(extrafont)
import(ggplot2)
import(ggthemes)
import(grid)
importFrom(httr,POST)
importFrom(httr,content)
Expand Down
8 changes: 6 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# envreportutils 0.6.2

* Dropped `ggthemes` dependency for `theme_soe()` and `theme_soe_facet` (#5).

# envreportutils 0.6.0.99999

# Added function `svg_px()` for exporting charts as svg, specifying size in pixels.
# Added `soft()` function for sending files via ENV SOFT service.
* Added function `svg_px()` for exporting charts as svg, specifying size in pixels.
* Added `soft()` function for sending files via ENV SOFT service.

# envreportutils 0.6.1

Expand Down
11 changes: 4 additions & 7 deletions R/theme_soe.r
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#' Default theme for EnvReportBC graphs and plots
#'
#' @import ggplot2 ggthemes extrafont
#' @import ggplot2 extrafont
#'
#' @param base_size base font size (default = 12)
#' @param base_family base font family (default = Verdana)
Expand All @@ -27,7 +27,7 @@ theme_soe <- function(base_size=12, base_family="Verdana") {

#' Default theme for EnvReportBC facetted graphs and plots
#'
#' @import ggplot2 ggthemes
#' @import ggplot2
#' @param base_size base font size (default = 12)
#' @param base_family base font family (default = Verdana)
#' @export
Expand All @@ -45,9 +45,7 @@ theme_soe_facet <- function(base_size = 12, base_family = "Verdana") {
}

theme_soe_foundation <- function(base_size, base_family) {
thm <- ggthemes::theme_foundation(base_size = base_size,
base_family = base_family) +
theme(
theme_grey() + theme(
text = element_text(colour = "black"),
line = element_line(colour = "black", size = 0.5,
linetype = 1, lineend = "butt"),
Expand All @@ -69,9 +67,8 @@ theme_soe_foundation <- function(base_size, base_family) {
axis.title.x = element_text(vjust = 0),
panel.spacing = unit(0.25, "lines"),
plot.background = element_blank(),
legend.key = element_blank(),
legend.key = element_blank(),
complete = TRUE)

thm
}

0 comments on commit 59f3ade

Please sign in to comment.