diff --git a/DESCRIPTION b/DESCRIPTION index 6eb26c4..e2edcb9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -11,7 +11,7 @@ Authors@R: c( person("Dan", "Wilson", email = "dan@thedatacollective.com.au", role = c("ctb"), comment = c("Secondary axis support")), person("Xavier", "Adam", role = c("ctb")), - person("Google", comment = "Roboto Condensed & Titillium Web Fonts0", + person("Google", comment = "Roboto Condensed & Titillium Web Fonts", role = c("cph")), person("IBM", comment = "Plex Sans Font", role = c("cph")), person("Jacob", "Barnett", email = "jacob.r.barnett@gmail.com", role = c("ctb")), diff --git a/R/color.r b/R/color.r index d7a0285..e177e1b 100644 --- a/R/color.r +++ b/R/color.r @@ -13,7 +13,7 @@ ipsum_pal <- function() { manual_pal(ipsum_palette) } #' See [ipsum_pal](). #' #' @md -#' @inheritParams ggplot2::scale_colour_hue +#' @inheritDotParams ggplot2::discrete_scale -expand -position #' @rdname scale_ipsum #' @export scale_colour_ipsum <- function(...) { discrete_scale("colour", "ipsum", ipsum_pal(), ...) } diff --git a/R/modern.r b/R/modern.r index 8f28e98..e4334f1 100644 --- a/R/modern.r +++ b/R/modern.r @@ -13,7 +13,16 @@ theme_modern_rc <- function (base_family = "Roboto Condensed", base_size = 11.5, axis_title_size = 9, axis_title_face = "plain", axis_title_just = "rt", plot_margin = margin(30, 30, 30, 30), grid = TRUE, axis = FALSE, ticks = FALSE) { - grid_col <- axis_col <- "white" + grid_col <- axis_col <- "#333333" + + ggplot2::update_geom_defaults("point", list(colour = "white")) + ggplot2::update_geom_defaults("line", list(colour = "white")) + ggplot2::update_geom_defaults("area", list(colour = "white", fill="white")) + ggplot2::update_geom_defaults("rect", list(colour = "white", fill="white")) + ggplot2::update_geom_defaults("density", list(colour = "white", fill="white")) + ggplot2::update_geom_defaults("bar", list(colour = "white", fill="white")) + ggplot2::update_geom_defaults("col", list(colour = "white", fill="white")) + ggplot2::update_geom_defaults("text", list(colour = "white")) ret <- ggplot2::theme_minimal(base_family=base_family, base_size=base_size) @@ -95,10 +104,10 @@ theme_modern_rc <- function (base_family = "Roboto Condensed", base_size = 11.5, ret <- ret + theme(plot.margin=plot_margin) ret <- ret + - theme(rect = element_rect(fill = "#0f0f0f", color = "#0f0f0f")) + - theme(plot.background = element_rect(fill = "#0f0f0f", color = "#0f0f0f")) + - theme(panel.background = element_rect(fill = "#0f0f0f", color = "#0f0f0f")) + - theme(rect = element_rect(fill = "#0f0f0f", color = "#0f0f0f")) + + theme(rect = element_rect(fill = "#1c1c1c", color = "#1c1c1c")) + + theme(plot.background = element_rect(fill = "#1c1c1c", color = "#1c1c1c")) + + theme(panel.background = element_rect(fill = "#1c1c1c", color = "#1c1c1c")) + + theme(rect = element_rect(fill = "#1c1c1c", color = "#1c1c1c")) + theme(text = element_text(color = "white")) + theme(axis.text = element_text(color = "white")) + theme(title = element_text(color = "white")) + diff --git a/R/zzz.r b/R/zzz.r index f6c8cba..689b56a 100644 --- a/R/zzz.r +++ b/R/zzz.r @@ -19,8 +19,8 @@ } fnt <- extrafont::fonttable() - if (!any(grepl("Arial[ ]Narrow|Roboto[ ]Condensed", fnt$FamilyName))) { - packageStartupMessage("NOTE: Either Arial Narrow or Roboto Condensed fonts are *required* to use these themes.") + if (!any(grepl("Fira[ ]*Sans[ ]*Condensed|Fira[ ]*Mono", fnt$FamilyName))) { + packageStartupMessage("NOTE: Fira Sans Condensed/Fira Mono fonts are *required* to use these themes.") packageStartupMessage(" Please use hrbrthemes::import_roboto_condensed() to install Roboto Condensed and") packageStartupMessage(" if Arial Narrow is not on your system, please see http://bit.ly/arialnarrow") } # nocov end diff --git a/cran-comments.md b/cran-comments.md index 014cd39..f028d38 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,6 +1,8 @@ ## Test environments -* local OS X install + travis-ci, R 3.5.0 & devel +* local OS X install + travis-ci, R 3.5.0 & devel (Travis is currently failing + - if folks check - due to a missing CRAN mirror component in RStudio's CRAN + mirror for Travis) * ubuntu 14.04 (on travis-ci), R oldrel, current, devel * win-builder (devel and release) * rhub::check_for_cran() @@ -9,13 +11,21 @@ 0 errors | 0 warnings | 0 notes +r-hub CRAN check notes "Author field differs from that derived from Authors@R" +due to the ORCID id auto-expansion to a URL. + * This is an update and CRAN-fix release. ## Reverse dependencies -- BAwiR -- fontHind -- fontMPlus +- BAwiR - ok +- fontHind - ok +- fontMPlus - ok --- +- new fonts and R markdown theme added +- some new utilities for ggplot2 themes +- fixed CRAN check errors on ubuntu (at least that's what all the + third-party testing sites tell me since it does not toss that + error on them) diff --git a/man/scale_ipsum.Rd b/man/scale_ipsum.Rd index 88163ce..e8e2d1a 100644 --- a/man/scale_ipsum.Rd +++ b/man/scale_ipsum.Rd @@ -13,28 +13,8 @@ scale_color_ipsum(...) scale_fill_ipsum(...) } \arguments{ -\item{...}{Arguments passed on to \code{discrete_scale} +\item{...}{Arguments passed on to \code{ggplot2::discrete_scale} \describe{ - \item{breaks}{One of: -\itemize{ -\item \code{NULL} for no breaks -\item \code{waiver()} for the default breaks computed by the -transformation object -\item A character vector of breaks -\item A function that takes the limits as input and returns breaks -as output -}} - \item{limits}{A character vector that defines possible values of the scale -and their order.} - \item{drop}{Should unused factor levels be omitted from the scale? -The default, \code{TRUE}, uses the levels that appear in the data; -\code{FALSE} uses all the levels in the factor.} - \item{na.translate}{Unlike continuous scales, discrete scales can easily show -missing values, and do so by default. If you want to remove missing values -from a discrete scale, specify \code{na.translate = FALSE}.} - \item{na.value}{If \code{na.translate = TRUE}, what value aesthetic -value should missing be displayed as? Does not apply to position scales -where \code{NA} is always placed at the far right.} \item{aesthetics}{The names of the aesthetics that this scale works with} \item{scale_name}{The name of the scale} \item{palette}{A palette function that when called with a single integer @@ -44,6 +24,15 @@ they should take} \code{waiver()}, the default, the name of the scale is taken from the first mapping used for that aesthetic. If \code{NULL}, the legend title will be omitted.} + \item{breaks}{One of: +\itemize{ +\item \code{NULL} for no breaks +\item \code{waiver()} for the default breaks computed by the +transformation object +\item A character vector of breaks +\item A function that takes the limits as input and returns breaks +as output +}} \item{labels}{One of: \itemize{ \item \code{NULL} for no labels @@ -53,16 +42,19 @@ transformation object \item A function that takes the breaks as input and returns labels as output }} - \item{expand}{Vector of range expansion constants used to add some -padding around the data, to ensure that they are placed some distance -away from the axes. Use the convenience function \code{\link[=expand_scale]{expand_scale()}} -to generate the values for the \code{expand} argument. The defaults are to -expand the scale by 5\% on each side for continuous variables, and by -0.6 units on each side for discrete variables.} + \item{limits}{A character vector that defines possible values of the scale +and their order.} + \item{na.translate}{Unlike continuous scales, discrete scales can easily show +missing values, and do so by default. If you want to remove missing values +from a discrete scale, specify \code{na.translate = FALSE}.} + \item{na.value}{If \code{na.translate = TRUE}, what value aesthetic +value should missing be displayed as? Does not apply to position scales +where \code{NA} is always placed at the far right.} + \item{drop}{Should unused factor levels be omitted from the scale? +The default, \code{TRUE}, uses the levels that appear in the data; +\code{FALSE} uses all the levels in the factor.} \item{guide}{A function used to create a guide or its name. See \code{\link[=guides]{guides()}} for more info.} - \item{position}{The position of the axis. "left" or "right" for vertical -scales, "top" or "bottom" for horizontal scales} \item{super}{The super class to use for the constructed scale} }} }