Browse Source

minor updates to account for ggplot2 changes

tags/0.8.0
boB Rudis 5 years ago
parent
commit
0be2464741
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
  1. 4
      DESCRIPTION
  2. 10
      NEWS.md
  3. 123
      R/roboto-condensed.r
  4. 8
      R/scales.r
  5. 32
      README.Rmd
  6. 71
      README.md
  7. BIN
      README_figs/README-ft-1.png
  8. BIN
      README_figs/README-unnamed-chunk-10-1.png
  9. BIN
      README_figs/README-unnamed-chunk-11-1.png
  10. BIN
      README_figs/README-unnamed-chunk-12-1.png
  11. BIN
      README_figs/README-unnamed-chunk-13-1.png
  12. BIN
      README_figs/README-unnamed-chunk-5-1.png
  13. BIN
      README_figs/README-unnamed-chunk-6-1.png
  14. BIN
      README_figs/README-unnamed-chunk-7-1.png
  15. BIN
      README_figs/README-unnamed-chunk-8-1.png
  16. BIN
      README_figs/README-unnamed-chunk-9-1.png
  17. 4
      man/ipsum.Rd
  18. 28
      man/scale_x_percent.Rd
  19. 6
      man/theme_ipsum_rc.Rd

4
DESCRIPTION

@ -1,8 +1,8 @@
Package: hrbrthemes
Type: Package
Title: Additional Themes, Theme Components and Utilities for 'ggplot2'
Version: 0.7.0
Date: 2019-04-09
Version: 0.7.1
Date: 2019-07-03
Authors@R: c(
person("Bob", "Rudis", email = "bob@rud.is", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-5670-2640")),

10
NEWS.md

@ -1,3 +1,13 @@
# hrbrthemes 0.7.1
- Small modification to percent scales to account for
changes in {ggplot2}
- Additional precision in setting various theme elements
# hrbrthemes 0.7.0
- fix CRAN check errors
# hrbrthemes 0.6.0
- new themes & fonts

123
R/roboto-condensed.r

@ -24,6 +24,7 @@
#' @param axis_title_just axis title font justificationk one of `[blmcrt]`
#' @param axis_text_size font size of axis text
#' @param plot_margin plot margin (specify with [ggplot2::margin])
#' @param panel_spacing panel spacing (use `unit()`)
#' @param grid_col grid color
#' @param grid panel grid (`TRUE`, `FALSE`, or a combination of `X`, `x`, `Y`, `y`)
#' @param axis_col axis color
@ -77,51 +78,59 @@ theme_ipsum_rc <- function(
axis_title_face = "plain",
axis_title_just = "rt",
plot_margin = margin(30, 30, 30, 30),
panel_spacing = grid::unit(2, "lines"),
grid_col = "#cccccc", grid = TRUE,
axis_col = "#cccccc", axis = FALSE, ticks = FALSE) {
ret <- ggplot2::theme_minimal(base_family=base_family, base_size=base_size)
ret <- ggplot2::theme_minimal(base_family = base_family, base_size = base_size)
ret <- ret + theme(legend.background=element_blank())
ret <- ret + theme(legend.key=element_blank())
ret <- ret + theme(legend.background = element_blank())
ret <- ret + theme(legend.key = element_blank())
if (inherits(grid, "character") | grid == TRUE) {
ret <- ret + theme(plot.margin = plot_margin)
ret <- ret + theme(panel.spacing = panel_spacing)
ret <- ret + theme(panel.grid=element_line(color=grid_col, size=0.2))
ret <- ret + theme(panel.grid.major=element_line(color=grid_col, size=0.2))
ret <- ret + theme(panel.grid.minor=element_line(color=grid_col, size=0.15))
if (inherits(grid, "character") | grid == TRUE) {
ret <- ret + theme(panel.grid = element_line(color = grid_col, size = 0.2))
ret <- ret + theme(panel.grid.major = element_line(color = grid_col, size = 0.2))
ret <- ret + theme(panel.grid.minor = element_line(color = grid_col, size = 0.15))
if (inherits(grid, "character")) {
if (regexpr("X", grid)[1] < 0) ret <- ret + theme(panel.grid.major.x=element_blank())
if (regexpr("Y", grid)[1] < 0) ret <- ret + theme(panel.grid.major.y=element_blank())
if (regexpr("x", grid)[1] < 0) ret <- ret + theme(panel.grid.minor.x=element_blank())
if (regexpr("y", grid)[1] < 0) ret <- ret + theme(panel.grid.minor.y=element_blank())
if (regexpr("X", grid)[1] < 0) ret <- ret + theme(panel.grid.major.x = element_blank())
if (regexpr("Y", grid)[1] < 0) ret <- ret + theme(panel.grid.major.y = element_blank())
if (regexpr("x", grid)[1] < 0) ret <- ret + theme(panel.grid.minor.x = element_blank())
if (regexpr("y", grid)[1] < 0) ret <- ret + theme(panel.grid.minor.x = element_blank())
}
} else {
ret <- ret + theme(panel.grid=element_blank())
ret <- ret + theme(panel.grid = element_blank())
ret <- ret + theme(panel.grid.major = element_blank())
ret <- ret + theme(panel.grid.major.x = element_blank())
ret <- ret + theme(panel.grid.major.y = element_blank())
ret <- ret + theme(panel.grid.minor = element_blank())
ret <- ret + theme(panel.grid.minor.x = element_blank())
ret <- ret + theme(panel.grid.minor.x = element_blank())
}
if (inherits(axis, "character") | axis == TRUE) {
ret <- ret + theme(axis.line=element_line(color=axis_col, size=0.15))
ret <- ret + theme(axis.line = element_line(color = axis_col, size = 0.15))
if (inherits(axis, "character")) {
axis <- tolower(axis)
if (regexpr("x", axis)[1] < 0) {
ret <- ret + theme(axis.line.x=element_blank())
ret <- ret + theme(axis.line.x = element_blank())
} else {
ret <- ret + theme(axis.line.x=element_line(color=axis_col, size=0.15))
ret <- ret + theme(axis.line.x = element_line(color = axis_col, size = 0.15))
}
if (regexpr("y", axis)[1] < 0) {
ret <- ret + theme(axis.line.y=element_blank())
ret <- ret + theme(axis.line.y = element_blank())
} else {
ret <- ret + theme(axis.line.y=element_line(color=axis_col, size=0.15))
ret <- ret + theme(axis.line.y = element_line(color = axis_col, size = 0.15))
}
} else {
ret <- ret + theme(axis.line.x=element_line(color=axis_col, size=0.15))
ret <- ret + theme(axis.line.y=element_line(color=axis_col, size=0.15))
ret <- ret + theme(axis.line.x = element_line(color = axis_col, size = 0.15))
ret <- ret + theme(axis.line.y = element_line(color = axis_col, size = 0.15))
}
} else {
ret <- ret + theme(axis.line=element_blank())
ret <- ret + theme(axis.line = element_blank())
}
if (!ticks) {
@ -129,37 +138,53 @@ theme_ipsum_rc <- function(
ret <- ret + theme(axis.ticks.x = element_blank())
ret <- ret + theme(axis.ticks.y = element_blank())
} else {
ret <- ret + theme(axis.ticks = element_line(size=0.15))
ret <- ret + theme(axis.ticks.x = element_line(size=0.15))
ret <- ret + theme(axis.ticks.y = element_line(size=0.15))
ret <- ret + theme(axis.ticks = element_line(size = 0.15))
ret <- ret + theme(axis.ticks.x = element_line(size = 0.15))
ret <- ret + theme(axis.ticks.y = element_line(size = 0.15))
ret <- ret + theme(axis.ticks.length = grid::unit(5, "pt"))
}
xj <- switch(tolower(substr(axis_title_just, 1, 1)), b=0, l=0, m=0.5, c=0.5, r=1, t=1)
yj <- switch(tolower(substr(axis_title_just, 2, 2)), b=0, l=0, m=0.5, c=0.5, r=1, t=1)
ret <- ret + theme(axis.text.x=element_text(size=axis_text_size, margin=margin(t=0)))
ret <- ret + theme(axis.text.y=element_text(size=axis_text_size, margin=margin(r=0)))
ret <- ret + theme(axis.title=element_text(size=axis_title_size, family=axis_title_family))
ret <- ret + theme(axis.title.x=element_text(hjust=xj, size=axis_title_size,
family=axis_title_family, face=axis_title_face))
ret <- ret + theme(axis.title.y=element_text(hjust=yj, size=axis_title_size,
family=axis_title_family, face=axis_title_face))
ret <- ret + theme(axis.title.y.right=element_text(hjust=yj, size=axis_title_size, angle=90,
family=axis_title_family, face=axis_title_face))
ret <- ret + theme(strip.text=element_text(hjust=0, size=strip_text_size,
face=strip_text_face, family=strip_text_family))
ret <- ret + theme(panel.spacing=grid::unit(2, "lines"))
ret <- ret + theme(plot.title=element_text(hjust=0, size=plot_title_size,
margin=margin(b=plot_title_margin),
family=plot_title_family, face=plot_title_face))
ret <- ret + theme(plot.subtitle=element_text(hjust=0, size=subtitle_size,
margin=margin(b=subtitle_margin),
family=subtitle_family, face=subtitle_face))
ret <- ret + theme(plot.caption=element_text(hjust=1, size=caption_size,
margin=margin(t=caption_margin),
family=caption_family, face=caption_face))
ret <- ret + theme(plot.margin=plot_margin)
xj <- switch(tolower(substr(axis_title_just, 1, 1)), b = 0, l = 0, m = 0.5, c = 0.5, r = 1, t = 1)
yj <- switch(tolower(substr(axis_title_just, 2, 2)), b = 0, l = 0, m = 0.5, c = 0.5, r = 1, t = 1)
ret <- ret + theme(axis.text = element_text(size = axis_text_size, margin = margin(t = 0, r = 0)))
ret <- ret + theme(axis.text.x = element_text(size = axis_text_size, margin = margin(t = 0)))
ret <- ret + theme(axis.text.y = element_text(size = axis_text_size, margin = margin(r = 0)))
ret <- ret + theme(axis.title = element_text(size = axis_title_size, family = axis_title_family))
ret <- ret + theme(axis.title.x = element_text(
hjust = xj, size = axis_title_size,
family = axis_title_family, face = axis_title_face
))
ret <- ret + theme(axis.title.y = element_text(
hjust = yj, size = axis_title_size,
family = axis_title_family, face = axis_title_face
))
ret <- ret + theme(axis.title.y.right = element_text(
hjust = yj, size = axis_title_size, angle = 90,
family = axis_title_family, face = axis_title_face
))
ret <- ret + theme(strip.text = element_text(
hjust = 0, size = strip_text_size,
face = strip_text_face, family = strip_text_family
))
ret <- ret + theme(plot.title = element_text(
hjust = 0, size = plot_title_size,
margin = margin(b = plot_title_margin),
family = plot_title_family, face = plot_title_face
))
ret <- ret + theme(plot.subtitle = element_text(
hjust = 0, size = subtitle_size,
margin = margin(b = subtitle_margin),
family = subtitle_family, face = subtitle_face
))
ret <- ret + theme(plot.caption = element_text(
hjust = 1, size = caption_size,
margin = margin(t = caption_margin),
family = caption_family, face = caption_face
))
ret

8
R/scales.r

@ -51,7 +51,7 @@ is.formula <- function (x) { inherits(x, "formula") }
#' @param sec.axis specify a secondary axis
#' @export
scale_x_percent <- function (name = waiver(), breaks = waiver(), minor_breaks = waiver(),
labels = scales::percent, limits = NULL, expand = c(0.01,0), oob = censor,
labels = scales::percent_format(accuracy = 1), limits = NULL, expand = c(0.01,0), oob = censor,
na.value = NA_real_, trans = "identity", position = "bottom",
sec.axis = waiver()) {
sc <- ggplot2::continuous_scale(c("x", "xmin", "xmax", "xend", "xintercept",
@ -73,7 +73,7 @@ scale_x_percent <- function (name = waiver(), breaks = waiver(), minor_breaks =
#' @rdname scale_x_percent
#' @export
scale_y_percent <- function (name = waiver(), breaks = waiver(), minor_breaks = waiver(),
labels = scales::percent, limits = NULL, expand = c(0.01,0), oob = censor,
labels = scales::percent_format(accuracy = 1), limits = NULL, expand = c(0.01,0), oob = censor,
na.value = NA_real_, trans = "identity", position = "left",
sec.axis = waiver()) {
sc <- ggplot2::continuous_scale(c("y", "ymin", "ymax", "yend", "yintercept",
@ -95,7 +95,7 @@ scale_y_percent <- function (name = waiver(), breaks = waiver(), minor_breaks =
#' @rdname scale_x_percent
#' @export
scale_x_comma <- function (name = waiver(), breaks = waiver(), minor_breaks = waiver(),
labels = scales::comma, limits = NULL, expand = c(0.01,0), oob = censor,
labels = scales::comma_format(), limits = NULL, expand = c(0.01,0), oob = censor,
na.value = NA_real_, trans = "identity", position = "bottom",
sec.axis = waiver()) {
sc <- ggplot2::continuous_scale(c("x", "xmin", "xmax", "xend", "xintercept",
@ -118,7 +118,7 @@ scale_x_comma <- function (name = waiver(), breaks = waiver(), minor_breaks = wa
#' @rdname scale_x_percent
#' @export
scale_y_comma <- function (name = waiver(), breaks = waiver(), minor_breaks = waiver(),
labels = scales::comma, limits = NULL, expand = c(0.01,0), oob = censor,
labels = scales::comma_format(), limits = NULL, expand = c(0.01,0), oob = censor,
na.value = NA_real_, trans = "identity", position = "left",
sec.axis = waiver()) {
sc <- ggplot2::continuous_scale(c("y", "ymin", "ymax", "yend", "yintercept",

32
README.Rmd

@ -24,26 +24,26 @@ The following functions are implemented/objects are exported:
Themes:
- `theme_ft_rc`: A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typoghraphy
- `theme_ipsum`: A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typography
- `theme_ipsum_ps`: A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typoghraphy
- `theme_ipsum_pub`: A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typoghraphy
- `theme_ipsum_rc`: A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typoghraphy
- `theme_ipsum_tw`: A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typoghraphy
- `theme_modern_rc`: A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typoghraphy
- `theme_ipsum`: Arial Narrow
- `theme_ipsum_rc`: Roboto Condensed
- `theme_ipsum_ps`: IBM Plex Sans font
- `theme_ipsum_pub`: Public Sans
- `theme_ipsum_tw`: Titilium Web
- `theme_modern_rc`: Roboto Condensed dark theme
- `theme_ft_rc`: Dark theme based on FT's dark theme (Roboto Condensed)
Scales (that align with various themes):
- `scale_color_ft`: Discrete color & fill scales based on the FT palette
- `scale_color_ipsum`: Discrete color & fill scales based on the ipsum palette
- `scale_colour_ft`: Discrete color & fill scales based on the FT palette
- `scale_colour_ipsum`: Discrete color & fill scales based on the ipsum palette
- `scale_fill_ft`: Discrete color & fill scales based on the FT palette
- `scale_fill_ipsum`: Discrete color & fill scales based on the ipsum palette
- `scale_x_comma`: X & Y scales with opinionated pre-sets for percent & comma label formats
- `scale_x_percent`: X & Y scales with opinionated pre-sets for percent & comma label formats
- `scale_y_comma`: X & Y scales with opinionated pre-sets for percent & comma label formats
- `scale_y_percent`: X & Y scales with opinionated pre-sets for percent & comma label formats
- `scale_color_ft`: Discrete color & fill scales based on the FT palette
- `scale_colour_ft`: Discrete color & fill scales based on the FT palette
- `scale_fill_ft`: Discrete color & fill scales based on the FT palette
- `scale_x_comma`: X & Y scales with opinionated presets for percent & comma label formats
- `scale_x_percent`: X & Y scales with opinionated presets for percent & comma label formats
- `scale_y_comma`: X & Y scales with opinionated presets for percent & comma label formats
- `scale_y_percent`: X & Y scales with opinionated presets for percent & comma label formats
Palettes/Named Colors:
@ -55,14 +55,14 @@ Palettes/Named Colors:
Fonts:
- `font_an`: Arial Narrow font name R variable aliases
- `font_rc`: Roboto Condensed font name R variable aliases
- `font_rc_light`: Roboto Condensed font name R variable aliases
- `font_pub`: Public Sans font name R variable aliases
- `font_pub_bold`: Public Sans font name R variable aliases
- `font_pub_light`: Public Sans font name R variable aliases
- `font_pub_thin`: Public Sans font name R variable aliases
- `font_ps`: PlexSans font name R variable aliases
- `font_ps_light`: PlexSans font name R variable aliases
- `font_rc`: Roboto Condensed font name R variable aliases
- `font_rc_light`: Roboto Condensed font name R variable aliases
- `font_tw`: Titillium Web font name R variable aliases
- `font_tw_bold`: Titillium Web font name R variable aliases
- `font_tw_light`: Titillium Web font name R variable aliases

71
README.md

@ -8,8 +8,9 @@ developed.](http://www.repostatus.org/badges/0.1.0/active.svg)](http://www.repos
[![Travis-CI Build
Status](https://travis-ci.org/hrbrmstr/hrbrthemes.svg?branch=master)](https://travis-ci.org/hrbrmstr/hrbrthemes)
[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/hrbrthemes)](https://cran.r-project.org/package=hrbrthemes)
![downloads](http://cranlogs.r-pkg.org/badges/grand-total/hrbrthemes)
![downloads](http://cranlogs.r-pkg.org/badges/grand-total/hrbrthemes)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2545422.svg)](https://doi.org/10.5281/zenodo.2545422)
-----
This is a very focused package that provides typography-centric themes
@ -29,43 +30,37 @@ The following functions are implemented/objects are exported:
Themes:
- `theme_ft_rc`: A precise & pristine ggplot2 theme with opinionated
defaults and an emphasis on typoghraphy
- `theme_ipsum`: A precise & pristine ggplot2 theme with opinionated
defaults and an emphasis on typography
- `theme_ipsum_ps`: A precise & pristine ggplot2 theme with
opinionated defaults and an emphasis on typoghraphy
- `theme_ipsum_pub`: A precise & pristine ggplot2 theme with
opinionated defaults and an emphasis on typoghraphy
- `theme_ipsum_rc`: A precise & pristine ggplot2 theme with
opinionated defaults and an emphasis on typoghraphy
- `theme_ipsum_tw`: A precise & pristine ggplot2 theme with
opinionated defaults and an emphasis on typoghraphy
- `theme_modern_rc`: A precise & pristine ggplot2 theme with
opinionated defaults and an emphasis on typoghraphy
- `theme_ipsum`: Arial Narrow
- `theme_ipsum_rc`: Roboto Condensed
- `theme_ipsum_ps`: IBM Plex Sans font
- `theme_ipsum_pub`: Public Sans
- `theme_ipsum_tw`: Titilium Web
- `theme_modern_rc`: Roboto Condensed dark theme
- `theme_ft_rc`: Dark theme based on FT’s dark theme (Roboto
Condensed)
Scales (that align with various themes):
- `scale_color_ft`: Discrete color & fill scales based on the FT
palette
- `scale_color_ipsum`: Discrete color & fill scales based on the ipsum
palette
- `scale_colour_ft`: Discrete color & fill scales based on the FT
palette
- `scale_colour_ipsum`: Discrete color & fill scales based on the
ipsum palette
- `scale_fill_ft`: Discrete color & fill scales based on the FT
palette
- `scale_fill_ipsum`: Discrete color & fill scales based on the ipsum
palette
- `scale_x_comma`: X & Y scales with opinionated pre-sets for percent
- `scale_color_ft`: Discrete color & fill scales based on the FT
palette
- `scale_colour_ft`: Discrete color & fill scales based on the FT
palette
- `scale_fill_ft`: Discrete color & fill scales based on the FT
palette
- `scale_x_comma`: X & Y scales with opinionated presets for percent &
comma label formats
- `scale_x_percent`: X & Y scales with opinionated presets for percent
& comma label formats
- `scale_x_percent`: X & Y scales with opinionated pre-sets for
percent & comma label formats
- `scale_y_comma`: X & Y scales with opinionated pre-sets for percent
- `scale_y_comma`: X & Y scales with opinionated presets for percent &
comma label formats
- `scale_y_percent`: X & Y scales with opinionated presets for percent
& comma label formats
- `scale_y_percent`: X & Y scales with opinionated pre-sets for
percent & comma label formats
Palettes/Named Colors:
@ -77,14 +72,14 @@ Palettes/Named Colors:
Fonts:
- `font_an`: Arial Narrow font name R variable aliases
- `font_ps`: PlexSans font name R variable aliases
- `font_ps_light`: PlexSans font name R variable aliases
- `font_pub`: Public Sans font name R variable aliases
- `font_pub_bold`: Public Sans font name R variable aliases
- `font_pub_light`: Public Sans font name R variable aliases
- `font_pub_thin`: Public Sans font name R variable aliases
- `font_rc`: Roboto Condensed font name R variable aliases
- `font_rc_light`: Roboto Condensed font name R variable aliases
- `font_pub`: Public Sans font name R variable aliases
- `font_pub_bold`: Public Sans font name R variable aliases
- `font_pub_light`: Public Sans font name R variable aliases
- `font_pub_thin`: Public Sans font name R variable aliases
- `font_ps`: PlexSans font name R variable aliases
- `font_ps_light`: PlexSans font name R variable aliases
- `font_tw`: Titillium Web font name R variable aliases
- `font_tw_bold`: Titillium Web font name R variable aliases
- `font_tw_light`: Titillium Web font name R variable aliases
@ -124,7 +119,7 @@ library(tidyverse)
# current verison
packageVersion("hrbrthemes")
## [1] '0.5.0'
## [1] '0.7.1'
```
### Base theme (Arial Narrow)
@ -311,10 +306,10 @@ gg_check(gg)
### hrbrthemes Metrics
| Lang | \# Files | (%) | LoC | (%) | Blank lines | (%) | \# Lines | (%) |
| :--- | -------: | ---: | ---: | --: | ----------: | ---: | -------: | ---: |
| R | 20 | 0.91 | 1083 | 0.9 | 212 | 0.68 | 582 | 0.78 |
| Rmd | 2 | 0.09 | 124 | 0.1 | 99 | 0.32 | 162 | 0.22 |
| Lang | \# Files | (%) | LoC | (%) | Blank lines | (%) | \# Lines | (%) |
| :--- | -------: | ---: | ---: | ---: | ----------: | --: | -------: | --: |
| R | 21 | 0.91 | 1214 | 0.91 | 235 | 0.7 | 680 | 0.8 |
| Rmd | 2 | 0.09 | 124 | 0.09 | 99 | 0.3 | 167 | 0.2 |
### Code of Conduct

BIN
README_figs/README-ft-1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 78 KiB

BIN
README_figs/README-unnamed-chunk-10-1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 83 KiB

BIN
README_figs/README-unnamed-chunk-11-1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 KiB

After

Width:  |  Height:  |  Size: 156 KiB

BIN
README_figs/README-unnamed-chunk-12-1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 95 KiB

BIN
README_figs/README-unnamed-chunk-13-1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 63 KiB

BIN
README_figs/README-unnamed-chunk-5-1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 79 KiB

BIN
README_figs/README-unnamed-chunk-6-1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 76 KiB

BIN
README_figs/README-unnamed-chunk-7-1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 KiB

After

Width:  |  Height:  |  Size: 213 KiB

BIN
README_figs/README-unnamed-chunk-8-1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 KiB

After

Width:  |  Height:  |  Size: 213 KiB

BIN
README_figs/README-unnamed-chunk-9-1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 84 KiB

4
man/ipsum.Rd

@ -30,8 +30,8 @@ outputting HTML directly into the markdown document).}
\item{dev}{Graphics device to use for figure output (defaults to png)}
\item{smart}{Produce typographically correct output, converting straight
quotes to curly quotes, --- to em-dashes, -- to en-dashes, and ... to
ellipses.}
quotes to curly quotes, \code{---} to em-dashes, \code{--} to en-dashes, and
\code{...} to ellipses.}
\item{self_contained}{Produce a standalone HTML file with no external
dependencies, using data: URIs to incorporate the contents of linked

28
man/scale_x_percent.Rd

@ -8,24 +8,28 @@
\title{X & Y scales with opinionated pre-sets for percent & comma label formats}
\usage{
scale_x_percent(name = waiver(), breaks = waiver(),
minor_breaks = waiver(), labels = scales::percent, limits = NULL,
expand = c(0.01, 0), oob = censor, na.value = NA_real_,
trans = "identity", position = "bottom", sec.axis = waiver())
minor_breaks = waiver(), labels = scales::percent_format(accuracy =
1), limits = NULL, expand = c(0.01, 0), oob = censor,
na.value = NA_real_, trans = "identity", position = "bottom",
sec.axis = waiver())
scale_y_percent(name = waiver(), breaks = waiver(),
minor_breaks = waiver(), labels = scales::percent, limits = NULL,
expand = c(0.01, 0), oob = censor, na.value = NA_real_,
trans = "identity", position = "left", sec.axis = waiver())
minor_breaks = waiver(), labels = scales::percent_format(accuracy =
1), limits = NULL, expand = c(0.01, 0), oob = censor,
na.value = NA_real_, trans = "identity", position = "left",
sec.axis = waiver())
scale_x_comma(name = waiver(), breaks = waiver(),
minor_breaks = waiver(), labels = scales::comma, limits = NULL,
expand = c(0.01, 0), oob = censor, na.value = NA_real_,
trans = "identity", position = "bottom", sec.axis = waiver())
minor_breaks = waiver(), labels = scales::comma_format(),
limits = NULL, expand = c(0.01, 0), oob = censor,
na.value = NA_real_, trans = "identity", position = "bottom",
sec.axis = waiver())
scale_y_comma(name = waiver(), breaks = waiver(),
minor_breaks = waiver(), labels = scales::comma, limits = NULL,
expand = c(0.01, 0), oob = censor, na.value = NA_real_,
trans = "identity", position = "left", sec.axis = waiver())
minor_breaks = waiver(), labels = scales::comma_format(),
limits = NULL, expand = c(0.01, 0), oob = censor,
na.value = NA_real_, trans = "identity", position = "left",
sec.axis = waiver())
}
\arguments{
\item{name}{The name of the scale. Used as axis or legend title. If

6
man/theme_ipsum_rc.Rd

@ -49,8 +49,8 @@ theme_ipsum_rc(base_family = "Roboto Condensed", base_size = 11.5,
axis_text_size = base_size, axis_title_family = base_family,
axis_title_size = 9, axis_title_face = "plain",
axis_title_just = "rt", plot_margin = margin(30, 30, 30, 30),
grid_col = "#cccccc", grid = TRUE, axis_col = "#cccccc",
axis = FALSE, ticks = FALSE)
panel_spacing = grid::unit(2, "lines"), grid_col = "#cccccc",
grid = TRUE, axis_col = "#cccccc", axis = FALSE, ticks = FALSE)
}
\arguments{
\item{base_family, base_size}{base font family and size}
@ -79,6 +79,8 @@ theme_ipsum_rc(base_family = "Roboto Condensed", base_size = 11.5,
\item{ticks}{ticks if \code{TRUE} add ticks}
\item{panel_spacing}{panel spacing (use \code{unit()})}
\item{grid_col}{grid color}
\item{axis_col}{axis color}

Loading…
Cancel
Save