diff --git a/DESCRIPTION b/DESCRIPTION index 42eb2bc..8622172 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -58,5 +58,5 @@ Imports: tools, magrittr, gdtools -RoxygenNote: 7.1.1 +RoxygenNote: 7.1.2 VignetteBuilder: knitr diff --git a/R/econ-sans.R b/R/econ-sans.R index 81f21e5..b291aaf 100644 --- a/R/econ-sans.R +++ b/R/econ-sans.R @@ -1,4 +1,4 @@ -#' A precise & pristine [ggplot2] theme with opinionated defaults and an emphasis on typoghraphy +#' A precise & pristine [ggplot2] theme with opinionated defaults and an emphasis on typography #' #' You should [import_econ_sans()] first and also install the fonts on your #' system before trying to use this theme. @@ -15,13 +15,13 @@ #' #' @md #' @param base_family,base_size base font family and size -#' @param plot_title_family,plot_title_face,plot_title_size,plot_title_margin plot tilte family, face, size and margin +#' @param plot_title_family,plot_title_face,plot_title_size,plot_title_margin plot title family, face, size and margin #' @param subtitle_family,subtitle_face,subtitle_size plot subtitle family, face and size #' @param subtitle_margin plot subtitle margin bottom (single numeric value) #' @param strip_text_family,strip_text_face,strip_text_size facet label font family, face and size #' @param caption_family,caption_face,caption_size,caption_margin plot caption family, face, size and margin #' @param axis_title_family,axis_title_face,axis_title_size axis title font family, face and size -#' @param axis_title_just axis title font justificationk one of `[blmcrt]` +#' @param axis_title_just axis title font justification; 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()`) diff --git a/R/flush-ticks.R b/R/flush-ticks.R index f33f489..f52adee 100644 --- a/R/flush-ticks.R +++ b/R/flush-ticks.R @@ -1,11 +1,11 @@ #' Makes axis text labels flush on the ends #' -#' A covenience function intended for basic, fixed-scale plots only (i.e. does not handle +#' A convenience function intended for basic, fixed-scale plots only (i.e. does not handle #' free scales in facets).\cr #' \cr #' You need to pass in a ggplot2 object to this function. It can't be `+`'d in a chain #' of geoms, coords, scales, themes, etc. It also builds the plot (but does not display -#' it) so if the plt takes a while (i.e. has lots of data or transforms) this will also +#' it) so if the plot takes a while (i.e. has lots of data or transforms) this will also #' take a while. #' #' @md diff --git a/R/goldmansans.R b/R/goldmansans.R index 3a06772..7f7ef12 100644 --- a/R/goldmansans.R +++ b/R/goldmansans.R @@ -1,4 +1,4 @@ -#' A precise & pristine [ggplot2] theme with opinionated defaults and an emphasis on typoghraphy +#' A precise & pristine [ggplot2] theme with opinionated defaults and an emphasis on typography #' #' You should [import_goldman_sans()] first and also install the fonts on your #' system before trying to use this theme. @@ -14,13 +14,13 @@ #' #' @md #' @param base_family,base_size base font family and size -#' @param plot_title_family,plot_title_face,plot_title_size,plot_title_margin plot tilte family, face, size and margin +#' @param plot_title_family,plot_title_face,plot_title_size,plot_title_margin plot title family, face, size and margin #' @param subtitle_family,subtitle_face,subtitle_size plot subtitle family, face and size #' @param subtitle_margin plot subtitle margin bottom (single numeric value) #' @param strip_text_family,strip_text_face,strip_text_size facet label font family, face and size #' @param caption_family,caption_face,caption_size,caption_margin plot caption family, face, size and margin #' @param axis_title_family,axis_title_face,axis_title_size axis title font family, face and size -#' @param axis_title_just axis title font justificationk one of `[blmcrt]` +#' @param axis_title_just axis title font justification; one of `[blmcrt]` #' @param axis_text_size font size of axis text #' @param plot_margin plot margin (specify with [ggplot2::margin]) #' @param grid_col grid color diff --git a/R/inter.R b/R/inter.R index 5cb309c..dbaa944 100644 --- a/R/inter.R +++ b/R/inter.R @@ -1,4 +1,4 @@ -#' A precise & pristine [ggplot2] theme with opinionated defaults and an emphasis on typoghraphy +#' A precise & pristine [ggplot2] theme with opinionated defaults and an emphasis on typography #' #' You should [import_inter()] first and also install the fonts on your #' system before trying to use this theme. @@ -14,14 +14,14 @@ #' #' @md #' @param base_family,base_size base font family and size -#' @param plot_title_family,plot_title_face,plot_title_size,plot_title_margin plot tilte family, face, size and margin +#' @param plot_title_family,plot_title_face,plot_title_size,plot_title_margin plot title family, face, size and margin #' @param subtitle_family,subtitle_face,subtitle_size plot subtitle family, face and size #' @param subtitle_margin plot subtitle margin bottom (single numeric value) #' @param strip_text_family,strip_text_face,strip_text_size facet label font family, face and size #' @param caption_family,caption_face,caption_size,caption_margin plot caption family, face, size and margin +#' @param axis_text_family,axis_text_face,axis_text_size axis text font family, face, and size #' @param axis_title_family,axis_title_face,axis_title_size axis title font family, face and size -#' @param axis_title_just axis title font justificationk one of `[blmcrt]` -#' @param axis_text_size font size of axis text +#' @param axis_title_just axis title font justification; one of `[blmcrt]` #' @param plot_margin plot margin (specify with [ggplot2::margin]) #' @param grid_col grid color #' @param grid panel grid (`TRUE`, `FALSE`, or a combination of `X`, `x`, `Y`, `y`) diff --git a/R/ipsum.r b/R/ipsum.r index af5fa52..5867fbe 100644 --- a/R/ipsum.r +++ b/R/ipsum.r @@ -6,6 +6,7 @@ #' @param toc,toc_depth TOC params #' @param extra_dependencies,... Additional function arguments to pass to the #' base R Markdown HTML output formatter +#' @param smart Deprecated #' @export ipsum <- function(number_sections = FALSE, fig_width = 7, @@ -90,7 +91,6 @@ ipsum <- function(number_sections = FALSE, clean_supporting = self_contained, pre_processor = pre_processor, base_format = rmarkdown::html_document_base( - smart = smart, theme = theme, self_contained = self_contained, lib_dir = lib_dir, diff --git a/R/plexsans.R b/R/plexsans.R index 860b7c7..8aee0f8 100644 --- a/R/plexsans.R +++ b/R/plexsans.R @@ -1,4 +1,4 @@ -#' A precise & pristine [ggplot2] theme with opinionated defaults and an emphasis on typoghraphy +#' A precise & pristine [ggplot2] theme with opinionated defaults and an emphasis on typography #' #' You should [import_plex_sans()] first and also install the fonts on your #' system before trying to use this theme. @@ -15,13 +15,13 @@ #' #' @md #' @param base_family,base_size base font family and size -#' @param plot_title_family,plot_title_face,plot_title_size,plot_title_margin plot tilte family, face, size and margin +#' @param plot_title_family,plot_title_face,plot_title_size,plot_title_margin plot title family, face, size and margin #' @param subtitle_family,subtitle_face,subtitle_size plot subtitle family, face and size #' @param subtitle_margin plot subtitle margin bottom (single numeric value) #' @param strip_text_family,strip_text_face,strip_text_size facet label font family, face and size #' @param caption_family,caption_face,caption_size,caption_margin plot caption family, face, size and margin #' @param axis_title_family,axis_title_face,axis_title_size axis title font family, face and size -#' @param axis_title_just axis title font justificationk one of `[blmcrt]` +#' @param axis_title_just axis title font justification; one of `[blmcrt]` #' @param axis_text_size font size of axis text #' @param plot_margin plot margin (specify with [ggplot2::margin]) #' @param grid_col grid color diff --git a/R/public-sans.R b/R/public-sans.R index d854b23..a7a94e0 100644 --- a/R/public-sans.R +++ b/R/public-sans.R @@ -1,4 +1,4 @@ -#' A precise & pristine [ggplot2] theme with opinionated defaults and an emphasis on typoghraphy +#' A precise & pristine [ggplot2] theme with opinionated defaults and an emphasis on typography #' #' You should [import_public_sans()] first and also install the fonts on your #' system before trying to use this theme. @@ -15,13 +15,13 @@ #' #' @md #' @param base_family,base_size base font family and size -#' @param plot_title_family,plot_title_face,plot_title_size,plot_title_margin plot tilte family, face, size and margin +#' @param plot_title_family,plot_title_face,plot_title_size,plot_title_margin plot title family, face, size and margin #' @param subtitle_family,subtitle_face,subtitle_size plot subtitle family, face and size #' @param subtitle_margin plot subtitle margin bottom (single numeric value) #' @param strip_text_family,strip_text_face,strip_text_size facet label font family, face and size #' @param caption_family,caption_face,caption_size,caption_margin plot caption family, face, size and margin #' @param axis_title_family,axis_title_face,axis_title_size axis title font family, face and size -#' @param axis_title_just axis title font justificationk one of `[blmcrt]` +#' @param axis_title_just axis title font justification; one of `[blmcrt]` #' @param axis_text_size font size of axis text #' @param plot_margin plot margin (specify with [ggplot2::margin]) #' @param grid_col grid color diff --git a/R/roboto-condensed.r b/R/roboto-condensed.r index 14ae83d..f3686a8 100644 --- a/R/roboto-condensed.r +++ b/R/roboto-condensed.r @@ -1,4 +1,4 @@ -#' A precise & pristine [ggplot2] theme with opinionated defaults and an emphasis on typoghraphy +#' A precise & pristine [ggplot2] theme with opinionated defaults and an emphasis on typography #' #' You should [import_roboto_condensed()] first and also install the fonts on your #' system before trying to use this theme. @@ -15,13 +15,13 @@ #' #' @md #' @param base_family,base_size base font family and size -#' @param plot_title_family,plot_title_face,plot_title_size,plot_title_margin plot tilte family, face, size and margin +#' @param plot_title_family,plot_title_face,plot_title_size,plot_title_margin plot title family, face, size and margin #' @param subtitle_family,subtitle_face,subtitle_size plot subtitle family, face and size #' @param subtitle_margin plot subtitle margin bottom (single numeric value) #' @param strip_text_family,strip_text_face,strip_text_size facet label font family, face and size #' @param caption_family,caption_face,caption_size,caption_margin plot caption family, face, size and margin #' @param axis_title_family,axis_title_face,axis_title_size axis title font family, face and size -#' @param axis_title_just axis title font justificationk one of `[blmcrt]` +#' @param axis_title_just axis title font justification; 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()`) diff --git a/R/scales.r b/R/scales.r index 5cd399f..b22b281 100644 --- a/R/scales.r +++ b/R/scales.r @@ -3,11 +3,11 @@ is.waive <- function (x) { inherits(x, "waiver") } is.sec_axis <- function (x) { inherits(x, "AxisSecondary") } is.formula <- function (x) { inherits(x, "formula") } -#' X & Y scales with opinionated pre-sets for percent & comma label formats +#' X & Y scales with opinionated presets for percent & comma label formats #' #' The `_comma` ones set comma format for axis text and `expand=c(0,0)` (you need to set limits). #' -#' The `_percent` ones set precent format for axis text and `expand=c(0,0)` (you need to set limits). +#' The `_percent` ones set percent format for axis text and `expand=c(0,0)` (you need to set limits). #' #' @md #' @param name The name of the scale. Used as axis or legend title. If diff --git a/R/tinyhand.R b/R/tinyhand.R index 546e5d1..08dab22 100644 --- a/R/tinyhand.R +++ b/R/tinyhand.R @@ -24,13 +24,13 @@ font_th <- "BFTinyHand-Regular" #' #' @md #' @param base_family,base_size base font family and size -#' @param plot_title_family,plot_title_face,plot_title_size,plot_title_margin plot tilte family, face, size and margin +#' @param plot_title_family,plot_title_face,plot_title_size,plot_title_margin plot title family, face, size and margin #' @param subtitle_family,subtitle_face,subtitle_size plot subtitle family, face and size #' @param subtitle_margin plot subtitle margin bottom (single numeric value) #' @param strip_text_family,strip_text_face,strip_text_size facet label font family, face and size #' @param caption_family,caption_face,caption_size,caption_margin plot caption family, face, size and margin #' @param axis_title_family,axis_title_face,axis_title_size axis title font family, face and size -#' @param axis_title_just axis title font justificationk one of `[blmcrt]` +#' @param axis_title_just axis title font justification; one of `[blmcrt]` #' @param axis_text_size font size of axis text #' @param plot_margin plot margin (specify with [ggplot2::margin]) #' @param grid_col grid color diff --git a/R/titillium-web.R b/R/titillium-web.R index b4db023..cc09aae 100644 --- a/R/titillium-web.R +++ b/R/titillium-web.R @@ -1,4 +1,4 @@ -#' A precise & pristine [ggplot2] theme with opinionated defaults and an emphasis on typoghraphy +#' A precise & pristine [ggplot2] theme with opinionated defaults and an emphasis on typography #' #' You should [import_titillium_web()] first and also install the fonts on your #' system before trying to use this theme. @@ -15,13 +15,13 @@ #' #' @md #' @param base_family,base_size base font family and size -#' @param plot_title_family,plot_title_face,plot_title_size,plot_title_margin plot tilte family, face, size and margin +#' @param plot_title_family,plot_title_face,plot_title_size,plot_title_margin plot title family, face, size and margin #' @param subtitle_family,subtitle_face,subtitle_size plot subtitle family, face and size #' @param subtitle_margin plot subtitle margin bottom (single numeric value) #' @param strip_text_family,strip_text_face,strip_text_size facet label font family, face and size #' @param caption_family,caption_face,caption_size,caption_margin plot caption family, face, size and margin #' @param axis_title_family,axis_title_face,axis_title_size axis title font family, face and size -#' @param axis_title_just axis title font justificationk one of `[blmcrt]` +#' @param axis_title_just axis title font justification; one of `[blmcrt]` #' @param axis_text_size font size of axis text #' @param plot_margin plot margin (specify with [ggplot2::margin]) #' @param grid_col grid color diff --git a/README.Rmd b/README.Rmd index 99e86f9..16ac3a2 100644 --- a/README.Rmd +++ b/README.Rmd @@ -34,7 +34,7 @@ Themes: - `theme_ipsum_rc`: Roboto Condensed - `theme_ipsum_ps`: IBM Plex Sans font - `theme_ipsum_pub`: Public Sans -- `theme_ipsum_tw`: Titilium Web +- `theme_ipsum_tw`: Titillium Web - `theme_modern_rc`: Roboto Condensed dark theme - `theme_ft_rc`: Dark theme based on FT's dark theme (Roboto Condensed) @@ -273,4 +273,4 @@ cloc::cloc_pkg_md() ### Code of Conduct -Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. \ No newline at end of file +Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. diff --git a/README.md b/README.md index 69004ae..6f31337 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Themes: - `theme_ipsum_rc`: Roboto Condensed - `theme_ipsum_ps`: IBM Plex Sans font - `theme_ipsum_pub`: Public Sans - - `theme_ipsum_tw`: Titilium Web + - `theme_ipsum_tw`: Titillium Web - `theme_modern_rc`: Roboto Condensed dark theme - `theme_ft_rc`: Dark theme based on FT’s dark theme (Roboto Condensed) diff --git a/_pkgdown.yml b/_pkgdown.yml new file mode 100644 index 0000000..ed67985 --- /dev/null +++ b/_pkgdown.yml @@ -0,0 +1 @@ +url: https://cinc.rud.is/web/packages/hrbrthemes diff --git a/docs/404.html b/docs/404.html new file mode 100644 index 0000000..ce75fbf --- /dev/null +++ b/docs/404.html @@ -0,0 +1,115 @@ + + + + + + + +Page not found (404) • hrbrthemes + + + + + + + + + + + +
+
+ + + + +
+
+ + +Content not found. Please use links in the navbar. + +
+ + + +
+ + + + +
+ + + + + + + + diff --git a/docs/CONDUCT.html b/docs/CONDUCT.html index b4149fa..a2279d5 100644 --- a/docs/CONDUCT.html +++ b/docs/CONDUCT.html @@ -1,55 +1,12 @@ - - - - - - - -Contributor Code of Conduct • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Contributor Code of Conduct • hrbrthemes - + + - - -
-
- -
-
+
+ +
-
- + +
+ + + - - + diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 533b95e..ab74552 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -1,55 +1,12 @@ - - - - - - - -License • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -License • hrbrthemes - + + - - -
-
- -
-
+
+ +
-
- + +
+ + + - - + diff --git a/docs/articles/index.html b/docs/articles/index.html index 647bb69..bac5bd2 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -1,55 +1,12 @@ - - - - - - - -Articles • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Articles • hrbrthemes - + + - - -
-
- -
-
+
+
Why hrbrthemes?
+
+
-
- + +
+ + + - - + diff --git a/docs/articles/why_hrbrthemes.html b/docs/articles/why_hrbrthemes.html index e112614..47fb5e1 100644 --- a/docs/articles/why_hrbrthemes.html +++ b/docs/articles/why_hrbrthemes.html @@ -6,18 +6,21 @@ Why hrbrthemes? • hrbrthemes - - - + + + + + - - + - + + +
@@ -94,9 +92,9 @@

2019-02-07

The hrbrthemes package has two goals. First, it provides a base theme that focuses on typographic elements, including where various labels are placed as well as the fonts that are used. The second goal centers around productivity for a production workflow. In fact, this “production workflow” is the context for where the elements of hrbrthemes should be used.

A “production workflow” is when you intend for the output of your work to be put into a publication of some kind, whether it be a blog post, academic paper, presentation, internal report or industry publication. When you’re cranking through an analysis, the visual elements don’t need to be perfect. They are there to validate/support your work and are more of a starting point for the finished product than anything else. The level of attention to detail on the final graphical products can be a great motivator for your audience to either dive deep into your analysis text or relegate it to the TLDR pile.

-
-

-Font Fundamentals

+
+

Font Fundamentals +

There are nigh countless tomes written about the colors you should consider using in charts as well as how to produce “minimal” charts (i.e. eliminate “chart junk”). One area that is rarely discussed is the use of fonts in charts (i.e. chart typography). The hrbrthemes package is very opinionated about chart typography:

  • The font family used should be sans-serif typeface
  • @@ -107,26 +105,26 @@

  • Ideally, the font family used will have 100, 300, 500, 700 and 900 weights vs regular, bold, italic and bold italic
  • Because we’re working in ggplot2-land, the font family used should also be a TrueType font (TTF)
-
-

-Why sans-serif?

+
+

Why sans-serif? +

To use a gross oversimplification, there are two basic font types: Serif and Sans-serif (that’s a lie of convenience, there are more than two). hrbrthemes suggests using sans-serif fonts since they have a more “modern” feel to them, you’re not producing long-form text and labels on charts may need to scale down to small sizes. Typography nerds on either side of the serif vs sans-serif debate can point to 100+ years of research-based evidence supporting their particular “side”.

You can compare the typography in the two (non-hrbrthemes) charts below to see if you prefer sans-serif over serif:

If you work in a company, your communications department likely has a set of core brand fonts and said font groups likely contain both serif and sans-serif and you should strive to keep with the brand image and use whatever font(s) work best or work with your comms team to pick a standard, complementary font for the charts you produce.

-
-

-Kern-what?

-

Kerning is nothing more than a fancy word for spaces between letters and fonts have built-in tables for how various pairs of letters should be placed next to each other. Great fonts have kerning tables that typography nerds immediately recognize and adore. Fonts with poor kerning tables are easily recognized as such by even the least font-aware viewer.

+
+

Kern-what? +

+

Kerning is nothing more than a fancy word for spaces between letters and fonts have built-in tables for how various pairs of letters should be placed next to each other. Great fonts have kerning tables that typography nerds immediately recognize and adore. Fonts with poor kerning tables are easily recognized as such by even the least font-aware viewer.

-


https://www.xkcd.com/1015/

+


https://www.xkcd.com/1015/

Bad kerning will be a distraction from the chart contents. Great kerning will be a subconscious reinforcement of just how awesome your visualizations are.

-
-

-Tabula Figura

+
+

Tabula Figura +

Tabular digits line up when placed on top of each other. Proportional ones do not. This is best explained visually:

@@ -134,16 +132,16 @@

Can you spot the proportional digits from the tabular ones? (Hint: there are two of each.)

Proportional digits stand out (in a “yes, I just spilled sriracha on my white shirt” way) when used on the Y axis of a chart and the numeric labels contain numbers of varying widths (like Hind and Encode Sans Condensed in the example above). Using proportional digits will be one further, subtle, subliminal message to viewers that there is something not-quite-awesome about your creation.

-
-

-Clean and compact

-

The figure used in the previous section provided an example of condensed/narrow fonts and regular. Chart space is at a premium and it’s important to label and annotate your creations (sparingly but sufficiently). Choosing a font that is too wide will reduce your available space and also make it harder to read the text. Choosing a font that is too narrow/compressed/condensed will create different legiibility problems.

+
+

Clean and compact +

+

The figure used in the previous section provided an example of condensed/narrow fonts and regular. Chart space is at a premium and it’s important to label and annotate your creations (sparingly but sufficiently). Choosing a font that is too wide will reduce your available space and also make it harder to read the text. Choosing a font that is too narrow/compressed/condensed will create different legibility problems.

NOTE: It’s really hard to find a free condensed/narrow font with great kerning pairs and tabular digits. Such is the way of things.

(As an aside, the default line-height for Hind and M+ 1c is also sub-optimal and would require tweaking in ggplot2 calls to correct.)

-
-

-Weight. What?

+
+

Weight. What? +

Most fonts (and, more importantly, most free fonts) come in regular, italic, bold and bold italic (which I can’t bring myself to code in here). You really want to avoid italic and bold italic, especially at very small or very large sizes. Bold should be used sparingly as it draws the eye to that text.

Ideally, you’d use a font with a broad diversity of weights. The term weight can be though of as a numeric scale (the one used here was introduced by TrueType) between 100 and 900 (usually at 100 or 200 increments) or with names ranging from “hairline” through “ultra-black”.

Take Open Sans, for example:

@@ -152,46 +150,48 @@

There is plenty of room to work with in Open Sans. You can embolden the title, but mute the other labels and choose appropriate label fonts to both enhance style as well as reduce importance. Lighter weights are great for captions and even some direct annotations. Heaver weights should be used sparingly and for emphasis.

-
-

-TTF. Meh.

-

I’ll use another over-simplification and state that there two main font types: OTF and TTF (it’s another lie of convenience). OTF (OpenType) is more modern and flexible. TTF (TrueType) has been around longer and was a precursor to OTF. If you make PDFs or PostScript files from R you pretty much need to use TTF fonts due to the underlying tooling that it relies on. If you are making PNGs or SVGs you can likely use OTF but most communciations teams and publications want PDFs.

+
+

TTF. Meh. +

+

I’ll use another over-simplification and state that there two main font types: OTF and TTF (it’s another lie of convenience). OTF (OpenType) is more modern and flexible. TTF (TrueType) has been around longer and was a precursor to OTF. If you make PDFs or PostScript files from R you pretty much need to use TTF fonts due to the underlying tooling that it relies on. If you are making PNGs or SVGs you can likely use OTF but most communications teams and publications want PDFs.

-
-

-Spacing Out

+
+

Spacing Out +

Label/title placement is also important, as is the distance between those elements. Put text bits too close to each other or too far apart from each other will send negative subliminal messages. Centering vs left- or right-justification will also convey other messages (old-school vs modern, to put it somewhat bluntly).

hrbrthemes makes opinionated choices over the spacing between title elements and all labels. For some elements, it makes very new choices (such as the justification of the axis labels).

The font choices you make may cause you to adjust the hrbrthemes defaults, especially if you choose a font with a wonky line-height.

- +
-

Site built with pkgdown 1.2.0.

+

+

Site built with pkgdown 2.0.2.9000.

+
+ + + diff --git a/docs/articles/why_hrbrthemes_files/figure-html/unnamed-chunk-1-1.png b/docs/articles/why_hrbrthemes_files/figure-html/unnamed-chunk-1-1.png index 58989a7..64dbcec 100644 Binary files a/docs/articles/why_hrbrthemes_files/figure-html/unnamed-chunk-1-1.png and b/docs/articles/why_hrbrthemes_files/figure-html/unnamed-chunk-1-1.png differ diff --git a/docs/authors.html b/docs/authors.html index f462b62..3bc0cf2 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -1,55 +1,12 @@ - - - - - - - -Authors • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Authors and Citation • hrbrthemes - + + - - - -
-
-
-
+
-
-
- + +
+ + + - - + diff --git a/docs/bootstrap-toc.css b/docs/bootstrap-toc.css new file mode 100644 index 0000000..5a85941 --- /dev/null +++ b/docs/bootstrap-toc.css @@ -0,0 +1,60 @@ +/*! + * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) + * Copyright 2015 Aidan Feldman + * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ + +/* modified from https://github.com/twbs/bootstrap/blob/94b4076dd2efba9af71f0b18d4ee4b163aa9e0dd/docs/assets/css/src/docs.css#L548-L601 */ + +/* All levels of nav */ +nav[data-toggle='toc'] .nav > li > a { + display: block; + padding: 4px 20px; + font-size: 13px; + font-weight: 500; + color: #767676; +} +nav[data-toggle='toc'] .nav > li > a:hover, +nav[data-toggle='toc'] .nav > li > a:focus { + padding-left: 19px; + color: #563d7c; + text-decoration: none; + background-color: transparent; + border-left: 1px solid #563d7c; +} +nav[data-toggle='toc'] .nav > .active > a, +nav[data-toggle='toc'] .nav > .active:hover > a, +nav[data-toggle='toc'] .nav > .active:focus > a { + padding-left: 18px; + font-weight: bold; + color: #563d7c; + background-color: transparent; + border-left: 2px solid #563d7c; +} + +/* Nav: second level (shown on .active) */ +nav[data-toggle='toc'] .nav .nav { + display: none; /* Hide by default, but at >768px, show it */ + padding-bottom: 10px; +} +nav[data-toggle='toc'] .nav .nav > li > a { + padding-top: 1px; + padding-bottom: 1px; + padding-left: 30px; + font-size: 12px; + font-weight: normal; +} +nav[data-toggle='toc'] .nav .nav > li > a:hover, +nav[data-toggle='toc'] .nav .nav > li > a:focus { + padding-left: 29px; +} +nav[data-toggle='toc'] .nav .nav > .active > a, +nav[data-toggle='toc'] .nav .nav > .active:hover > a, +nav[data-toggle='toc'] .nav .nav > .active:focus > a { + padding-left: 28px; + font-weight: 500; +} + +/* from https://github.com/twbs/bootstrap/blob/e38f066d8c203c3e032da0ff23cd2d6098ee2dd6/docs/assets/css/src/docs.css#L631-L634 */ +nav[data-toggle='toc'] .nav > .active > ul { + display: block; +} diff --git a/docs/bootstrap-toc.js b/docs/bootstrap-toc.js new file mode 100644 index 0000000..1cdd573 --- /dev/null +++ b/docs/bootstrap-toc.js @@ -0,0 +1,159 @@ +/*! + * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) + * Copyright 2015 Aidan Feldman + * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ +(function() { + 'use strict'; + + window.Toc = { + helpers: { + // return all matching elements in the set, or their descendants + findOrFilter: function($el, selector) { + // http://danielnouri.org/notes/2011/03/14/a-jquery-find-that-also-finds-the-root-element/ + // http://stackoverflow.com/a/12731439/358804 + var $descendants = $el.find(selector); + return $el.filter(selector).add($descendants).filter(':not([data-toc-skip])'); + }, + + generateUniqueIdBase: function(el) { + var text = $(el).text(); + var anchor = text.trim().toLowerCase().replace(/[^A-Za-z0-9]+/g, '-'); + return anchor || el.tagName.toLowerCase(); + }, + + generateUniqueId: function(el) { + var anchorBase = this.generateUniqueIdBase(el); + for (var i = 0; ; i++) { + var anchor = anchorBase; + if (i > 0) { + // add suffix + anchor += '-' + i; + } + // check if ID already exists + if (!document.getElementById(anchor)) { + return anchor; + } + } + }, + + generateAnchor: function(el) { + if (el.id) { + return el.id; + } else { + var anchor = this.generateUniqueId(el); + el.id = anchor; + return anchor; + } + }, + + createNavList: function() { + return $(''); + }, + + createChildNavList: function($parent) { + var $childList = this.createNavList(); + $parent.append($childList); + return $childList; + }, + + generateNavEl: function(anchor, text) { + var $a = $(''); + $a.attr('href', '#' + anchor); + $a.text(text); + var $li = $('
  • '); + $li.append($a); + return $li; + }, + + generateNavItem: function(headingEl) { + var anchor = this.generateAnchor(headingEl); + var $heading = $(headingEl); + var text = $heading.data('toc-text') || $heading.text(); + return this.generateNavEl(anchor, text); + }, + + // Find the first heading level (`

    `, then `

    `, etc.) that has more than one element. Defaults to 1 (for `

    `). + getTopLevel: function($scope) { + for (var i = 1; i <= 6; i++) { + var $headings = this.findOrFilter($scope, 'h' + i); + if ($headings.length > 1) { + return i; + } + } + + return 1; + }, + + // returns the elements for the top level, and the next below it + getHeadings: function($scope, topLevel) { + var topSelector = 'h' + topLevel; + + var secondaryLevel = topLevel + 1; + var secondarySelector = 'h' + secondaryLevel; + + return this.findOrFilter($scope, topSelector + ',' + secondarySelector); + }, + + getNavLevel: function(el) { + return parseInt(el.tagName.charAt(1), 10); + }, + + populateNav: function($topContext, topLevel, $headings) { + var $context = $topContext; + var $prevNav; + + var helpers = this; + $headings.each(function(i, el) { + var $newNav = helpers.generateNavItem(el); + var navLevel = helpers.getNavLevel(el); + + // determine the proper $context + if (navLevel === topLevel) { + // use top level + $context = $topContext; + } else if ($prevNav && $context === $topContext) { + // create a new level of the tree and switch to it + $context = helpers.createChildNavList($prevNav); + } // else use the current $context + + $context.append($newNav); + + $prevNav = $newNav; + }); + }, + + parseOps: function(arg) { + var opts; + if (arg.jquery) { + opts = { + $nav: arg + }; + } else { + opts = arg; + } + opts.$scope = opts.$scope || $(document.body); + return opts; + } + }, + + // accepts a jQuery object, or an options object + init: function(opts) { + opts = this.helpers.parseOps(opts); + + // ensure that the data attribute is in place for styling + opts.$nav.attr('data-toggle', 'toc'); + + var $topContext = this.helpers.createChildNavList(opts.$nav); + var topLevel = this.helpers.getTopLevel(opts.$scope); + var $headings = this.helpers.getHeadings(opts.$scope, topLevel); + this.helpers.populateNav($topContext, topLevel, $headings); + } + }; + + $(function() { + $('nav[data-toggle="toc"]').each(function(i, el) { + var $nav = $(el); + Toc.init($nav); + }); + }); +})(); diff --git a/docs/index.html b/docs/index.html index d615dc2..5165a94 100644 --- a/docs/index.html +++ b/docs/index.html @@ -5,24 +5,28 @@ -Additional Themes, Theme Components and Utilities for 'ggplot2' • hrbrthemes - - - - - + + + + + + - - + + +
    -
    -

    -hrbrthemes : Additional Themes and Theme Components for ‘ggplot2’

    -

    Project Status: Active - The project has reached a stable, usable state and is being actively developed. codecov Travis-CI Build Status CRAN_Status_Badge downloadsDOI

    + + +
    +

    hrbrthemes +

    +

    Additional Themes and Theme Components for ‘ggplot2’


    -

    This is a very focused package that provides typography-centric themes and theme components for ggplot2. It’s a an extract/riff of hrbrmisc created by request.

    +

    This is a very focused package that provides typography-centric themes and theme components for ggplot2. It’s a an extract/riff of hrbrmisc created by request.

    The core theme: theme_ipsum (“ipsum” is Latin for “precise”) uses Arial Narrow which should be installed on practically any modern system, so it’s “free”-ish. This font is condensed, has solid default kerning pairs and geometric numbers. That’s what I consider the “font trifecta” must-have for charts. An additional quality for fonts for charts is that they have a diversity of weights. Arial Narrow (the one on most systems, anyway) does not have said diversity but this quality is not (IMO) a “must have”.

    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: Arial Narrow
    • -theme_ipsum: A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typography
    • +theme_ipsum_gs: Goldman Sans Condensed
    • -theme_ipsum_ps: A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typoghraphy
    • +theme_ipsum_es: Econ Sans Condensed
    • -theme_ipsum_rc: A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typoghraphy
    • +theme_ipsum_rc: Roboto Condensed
    • -theme_ipsum_tw: A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typoghraphy
    • +theme_ipsum_ps: IBM Plex Sans font
    • -theme_modern_rc: A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typoghraphy
    • +theme_ipsum_pub: Public Sans +
    • +theme_ipsum_tw: Titillium 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_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 pre-sets 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 pre-sets 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 pre-sets for percent & comma label formats
    • +scale_y_percent: X & Y scales with opinionated presets for percent & comma label formats

    Palettes/Named Colors:

      @@ -146,14 +153,28 @@

    • font_an: Arial Narrow font name R variable aliases
    • -font_ps: PlexSans font name R variable aliases
    • +font_es: Econ Sans font name R variable aliases
    • -font_ps_light: PlexSans font name R variable aliases
    • +font_es_bold: Econ Sans font name R variable aliases +
    • +font_es_light: Econ 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
    • @@ -176,6 +197,8 @@

    • gg_check: Spell check ggplot2 plot labels
    • +import_econ_sans: Import Econ Sans Condensed font for use in charts
    • +
    • import_plex_sans: Import IBM Plex Sans font for use in charts
    • import_roboto_condensed: Import Roboto Condensed font for use in charts
    • @@ -186,184 +209,209 @@

    • update_geom_font_defaults: Update matching font defaults for text geoms
    -
    -

    -Installation

    -
    devtools::install_github("hrbrmstr/hrbrthemes")
    +
    +

    Installation +

    +
    +install.packages("hrbrthemes") # NOTE: CRAN version is 0.8.0
    +# or
    +install.packages("hrbrthemes", repos = c("https://cinc.rud.is", "https://cloud.r-project.org/"))
    +# or
    +remotes::install_git("https://git.rud.is/hrbrmstr/hrbrthemes.git")
    +# or
    +remotes::install_git("https://git.sr.ht/~hrbrmstr/hrbrthemes")
    +# or
    +remotes::install_gitlab("hrbrmstr/hrbrthemes")
    +# or
    +remotes::install_bitbucket("hrbrmstr/hrbrthemes")
    +# or
    +remotes::install_github("hrbrmstr/hrbrthemes")
    +

    NOTE: To use the ‘remotes’ install options you will need to have the {remotes} package installed.

    -
    -

    -Usage

    -
    library(hrbrthemes)
    -library(gcookbook)
    -library(tidyverse)
    -
    -# current verison
    -packageVersion("hrbrthemes")
    -## [1] '0.6.0'
    +
    +

    Usage +

    +
    +library(hrbrthemes)
    +library(gcookbook)
    +library(tidyverse)
    +
    +# current verison
    +packageVersion("hrbrthemes")
    +## [1] '0.8.6'
    -
    -

    -Base theme (Arial Narrow)

    - -

    +
    +

    Base theme (Arial Narrow) +

    +
    +ggplot(mtcars, aes(mpg, wt)) +
    +  geom_point() +
    +  labs(x="Fuel efficiency (mpg)", y="Weight (tons)",
    +       title="Seminal ggplot2 scatterplot example",
    +       subtitle="A plot that is only useful for demonstration purposes",
    +       caption="Brought to you by the letter 'g'") + 
    +  theme_ipsum()
    +

    -
    -

    -Roboto Condensed

    - -

    +
    +

    Roboto Condensed +

    +
    +ggplot(mtcars, aes(mpg, wt)) +
    +  geom_point() +
    +  labs(x="Fuel efficiency (mpg)", y="Weight (tons)",
    +       title="Seminal ggplot2 scatterplot example",
    +       subtitle="A plot that is only useful for demonstration purposes",
    +       caption="Brought to you by the letter 'g'") + 
    +  theme_ipsum_rc()
    +

    -
    -

    -New FT Theme!

    - -

    +
    +

    New FT Theme! +

    +
    +ggplot(mtcars, aes(mpg, wt)) +
    +  geom_point(color = ft_cols$yellow) +
    +  labs(x="Fuel efficiency (mpg)", y="Weight (tons)",
    +       title="Seminal ggplot2 scatterplot example",
    +       subtitle="A plot that is only useful for demonstration purposes",
    +       caption="Brought to you by the letter 'g'") + 
    +  theme_ft_rc()
    +

    -
    -

    -IBM Plex Sans

    - -

    +
    +

    IBM Plex Sans +

    +
    +ggplot(mpg, aes(displ, hwy)) +
    +  geom_jitter(aes(color=class, fill=class), size=3, shape=21, alpha=1/2) +
    +  scale_x_continuous(expand=c(0,0), limits=c(1, 8), breaks=1:8) +
    +  scale_y_continuous(expand=c(0,0), limits=c(10, 50)) +
    +  scale_color_ipsum() +
    +  scale_fill_ipsum() +
    +  facet_wrap(~class, scales="free") +
    +  labs(
    +    title="IBM Plex Sans Test",
    +    subtitle="This is a subtitle to see the how it looks in IBM Plex Sans",
    +    caption="Source: hrbrthemes & IBM"
    +  ) +
    +  theme_ipsum_ps(grid="XY", axis="xy") +
    +  theme(legend.position="none") -> gg
    +
    +flush_ticks(gg)
    +## theme(axis.text.x=element_text(hjust=c(0, rep(0.5, 6), 1))) +
    +## theme(axis.text.y=element_text(vjust=c(0, rep(0.5, 3), 1)))
    +

    -
    -

    -Titillium Web

    - -

    +
    +

    Titillium Web +

    +
    +ggplot(mpg, aes(displ, hwy)) +
    +  geom_jitter(aes(color=class, fill=class), size=3, shape=21, alpha=1/2) +
    +  scale_x_continuous(expand=c(0,0), limits=c(1, 8), breaks=1:8) +
    +  scale_y_continuous(expand=c(0,0), limits=c(10, 50)) +
    +  scale_color_ipsum() +
    +  scale_fill_ipsum() +
    +  facet_wrap(~class, scales="free") +
    +  labs(
    +    title="Titillium Web",
    +    subtitle="This is a subtitle to see the how it looks in Titillium Web",
    +    caption="Source: hrbrthemes & Google"
    +  ) +
    +  theme_ipsum_tw(grid="XY", axis="xy") +
    +  theme(legend.position="none") -> gg
    +
    +flush_ticks(gg)
    +## theme(axis.text.x=element_text(hjust=c(0, rep(0.5, 6), 1))) +
    +## theme(axis.text.y=element_text(vjust=c(0, rep(0.5, 3), 1)))
    +

    -
    -

    -Scales (Color/Fill)

    - -

    +
    +

    Scales (Color/Fill) +

    +
    +ggplot(mtcars, aes(mpg, wt)) +
    +  geom_point(aes(color=factor(carb))) +
    +  labs(x="Fuel efficiency (mpg)", y="Weight (tons)",
    +       title="Seminal ggplot2 scatterplot example",
    +       subtitle="A plot that is only useful for demonstration purposes",
    +       caption="Brought to you by the letter 'g'") + 
    +  scale_color_ipsum() +
    +  theme_ipsum_rc()
    +

    -
    -

    -Scales (Axis)

    - -

    - -

    - -

    +
    +

    Scales (Axis) +

    +
    +count(mpg, class) %>% 
    +  mutate(pct=n/sum(n)) %>% 
    +  ggplot(aes(class, pct)) +
    +  geom_col() +
    +  scale_y_percent() +
    +  labs(x="Fuel efficiency (mpg)", y="Weight (tons)",
    +       title="Seminal ggplot2 column chart example with percents",
    +       subtitle="A plot that is only useful for demonstration purposes",
    +       caption="Brought to you by the letter 'g'") + 
    +  theme_ipsum(grid="Y")
    +

    +
    +ggplot(uspopage, aes(x=Year, y=Thousands, fill=AgeGroup)) + 
    +  geom_area() +
    +  scale_fill_ipsum() +
    +  scale_x_continuous(expand=c(0,0)) +
    +  scale_y_comma() +
    +  labs(title="Age distribution of population in the U.S., 1900-2002",
    +       subtitle="Example data from the R Graphics Cookbook",
    +       caption="Source: R Graphics Cookbook") +
    +  theme_ipsum_rc(grid="XY") +
    +  theme(axis.text.x=element_text(hjust=c(0, 0.5, 0.5, 0.5, 1))) +
    +  theme(legend.position="bottom")
    +

    +
    +update_geom_font_defaults(font_rc_light)
    +
    +count(mpg, class) %>% 
    +  mutate(n=n*2000) %>% 
    +  arrange(n) %>% 
    +  mutate(class=factor(class, levels=class)) %>% 
    +  ggplot(aes(class, n)) +
    +  geom_col() +
    +  geom_text(aes(label=scales::comma(n)), hjust=0, nudge_y=2000) +
    +  scale_y_comma(limits=c(0,150000)) +
    +  coord_flip() +
    +  labs(x="Fuel efficiency (mpg)", y="Weight (tons)",
    +       title="Seminal ggplot2 column chart example with commas",
    +       subtitle="A plot that is only useful for demonstration purposes, esp since you'd never\nreally want direct labels and axis labels",
    +       caption="Brought to you by the letter 'g'") + 
    +  theme_ipsum_rc(grid="X")
    +

    -
    -

    -Spellcheck ggplot2 labels

    - -

    +
    +

    Spellcheck ggplot2 labels +

    +
    +df <- data.frame(x=c(20, 25, 30), y=c(4, 4, 4), txt=c("One", "Two", "Three"))
    +
    +ggplot(mtcars, aes(mpg, wt)) +
    +  geom_point() +
    +  labs(x="This is some txt", y="This is more text",
    +       title="Thisy is a titlle",
    +       subtitle="This is a subtitley",
    +       caption="This is a captien") +
    +  theme_ipsum_rc(grid="XY") -> gg
    +
    +gg_check(gg)
    +## Possible misspelled words in [title]: (Thisy, titlle)
    +## Possible misspelled words in [subtitle]: (subtitley)
    +## Possible misspelled words in [caption]: (captien)
    +

    -
    -

    -hrbrthemes Metrics

    - +
    +

    hrbrthemes Metrics +

    +
    @@ -378,62 +426,94 @@

    - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + +
    Lang # Files
    R200.9110820.92110.685830.78240.8917240.803270.729080.84
    HTML10.042970.14320.0720.00
    Rmd 20.091240.1990.321620.220.071290.06980.211680.16
    -
    -

    -Code of Conduct

    -

    Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

    +
    +

    Code of Conduct +

    +

    Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

    +
    - + + + - - + diff --git a/docs/pkgdown.css b/docs/pkgdown.css index 2e4f0cf..80ea5b8 100644 --- a/docs/pkgdown.css +++ b/docs/pkgdown.css @@ -17,12 +17,14 @@ html, body { height: 100%; } +body { + position: relative; +} + body > .container { display: flex; height: 100%; flex-direction: column; - - padding-top: 60px; } body > .container .row { @@ -54,8 +56,10 @@ img.icon { float: right; } -img { +/* Ensure in-page images don't run outside their container */ +.contents img { max-width: 100%; + height: auto; } /* Fix bug in bootstrap (only seen in firefox) */ @@ -65,18 +69,21 @@ summary { /* Typographic tweaking ---------------------------------*/ -.contents h1.page-header { +.contents .page-header { margin-top: calc(-60px + 1em); } +dd { + margin-left: 3em; +} + /* Section anchors ---------------------------------*/ a.anchor { - margin-left: -30px; - display:inline-block; - width: 30px; - height: 30px; - visibility: hidden; + display: none; + margin-left: 5px; + width: 20px; + height: 20px; background-image: url(./link.svg); background-repeat: no-repeat; @@ -84,17 +91,15 @@ a.anchor { background-position: center center; } -.hasAnchor:hover a.anchor { - visibility: visible; -} - -@media (max-width: 767px) { - .hasAnchor:hover a.anchor { - visibility: hidden; - } +h1:hover .anchor, +h2:hover .anchor, +h3:hover .anchor, +h4:hover .anchor, +h5:hover .anchor, +h6:hover .anchor { + display: inline-block; } - /* Fixes for fixed navbar --------------------------*/ .contents h1, .contents h2, .contents h3, .contents h4 { @@ -102,37 +107,135 @@ a.anchor { margin-top: -40px; } -/* Static header placement on mobile devices */ -@media (max-width: 767px) { - .navbar-fixed-top { - position: absolute; - } - .navbar { - padding: 0; - } +/* Navbar submenu --------------------------*/ + +.dropdown-submenu { + position: relative; +} + +.dropdown-submenu>.dropdown-menu { + top: 0; + left: 100%; + margin-top: -6px; + margin-left: -1px; + border-radius: 0 6px 6px 6px; +} + +.dropdown-submenu:hover>.dropdown-menu { + display: block; +} + +.dropdown-submenu>a:after { + display: block; + content: " "; + float: right; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; + border-width: 5px 0 5px 5px; + border-left-color: #cccccc; + margin-top: 5px; + margin-right: -10px; +} + +.dropdown-submenu:hover>a:after { + border-left-color: #ffffff; } +.dropdown-submenu.pull-left { + float: none; +} + +.dropdown-submenu.pull-left>.dropdown-menu { + left: -100%; + margin-left: 10px; + border-radius: 6px 0 6px 6px; +} /* Sidebar --------------------------*/ -#sidebar { +#pkgdown-sidebar { margin-top: 30px; + position: -webkit-sticky; + position: sticky; + top: 70px; } -#sidebar h2 { + +#pkgdown-sidebar h2 { font-size: 1.5em; margin-top: 1em; } -#sidebar h2:first-child { +#pkgdown-sidebar h2:first-child { margin-top: 0; } -#sidebar .list-unstyled li { +#pkgdown-sidebar .list-unstyled li { margin-bottom: 0.5em; } +/* bootstrap-toc tweaks ------------------------------------------------------*/ + +/* All levels of nav */ + +nav[data-toggle='toc'] .nav > li > a { + padding: 4px 20px 4px 6px; + font-size: 1.5rem; + font-weight: 400; + color: inherit; +} + +nav[data-toggle='toc'] .nav > li > a:hover, +nav[data-toggle='toc'] .nav > li > a:focus { + padding-left: 5px; + color: inherit; + border-left: 1px solid #878787; +} + +nav[data-toggle='toc'] .nav > .active > a, +nav[data-toggle='toc'] .nav > .active:hover > a, +nav[data-toggle='toc'] .nav > .active:focus > a { + padding-left: 5px; + font-size: 1.5rem; + font-weight: 400; + color: inherit; + border-left: 2px solid #878787; +} + +/* Nav: second level (shown on .active) */ + +nav[data-toggle='toc'] .nav .nav { + display: none; /* Hide by default, but at >768px, show it */ + padding-bottom: 10px; +} + +nav[data-toggle='toc'] .nav .nav > li > a { + padding-left: 16px; + font-size: 1.35rem; +} + +nav[data-toggle='toc'] .nav .nav > li > a:hover, +nav[data-toggle='toc'] .nav .nav > li > a:focus { + padding-left: 15px; +} + +nav[data-toggle='toc'] .nav .nav > .active > a, +nav[data-toggle='toc'] .nav .nav > .active:hover > a, +nav[data-toggle='toc'] .nav .nav > .active:focus > a { + padding-left: 15px; + font-weight: 500; + font-size: 1.35rem; +} + +/* orcid ------------------------------------------------------------------- */ + .orcid { - height: 16px; + font-size: 16px; + color: #A6CE39; + /* margins are required by official ORCID trademark and display guidelines */ + margin-left:4px; + margin-right:4px; vertical-align: middle; } @@ -140,14 +243,14 @@ a.anchor { .ref-index th {font-weight: normal;} -.ref-index td {vertical-align: top;} +.ref-index td {vertical-align: top; min-width: 100px} .ref-index .icon {width: 40px;} .ref-index .alias {width: 40%;} .ref-index-icons .alias {width: calc(40% - 40px);} .ref-index .title {width: 60%;} .ref-arguments th {text-align: right; padding-right: 10px;} -.ref-arguments th, .ref-arguments td {vertical-align: top;} +.ref-arguments th, .ref-arguments td {vertical-align: top; min-width: 100px} .ref-arguments .name {width: 20%;} .ref-arguments .desc {width: 80%;} @@ -160,31 +263,26 @@ table { /* Syntax highlighting ---------------------------------------------------- */ -pre { - word-wrap: normal; - word-break: normal; - border: 1px solid #eee; -} - -pre, code { +pre, code, pre code { background-color: #f8f8f8; color: #333; } +pre, pre code { + white-space: pre-wrap; + word-break: break-all; + overflow-wrap: break-word; +} -pre code { - overflow: auto; - word-wrap: normal; - white-space: pre; +pre { + border: 1px solid #eee; } -pre .img { +pre .img, pre .r-plt { margin: 5px 0; } -pre .img img { +pre .img img, pre .r-plt img { background-color: #fff; - display: block; - height: auto; } code a, pre a { @@ -201,9 +299,8 @@ a.sourceLine:hover { .kw {color: #264D66;} /* keyword */ .co {color: #888888;} /* comment */ -.message { color: black; font-weight: bolder;} -.error { color: orange; font-weight: bolder;} -.warning { color: #6A0366; font-weight: bolder;} +.error {font-weight: bolder;} +.warning {font-weight: bolder;} /* Clipboard --------------------------*/ @@ -222,6 +319,19 @@ a.sourceLine:hover { visibility: visible; } +/* headroom.js ------------------------ */ + +.headroom { + will-change: transform; + transition: transform 200ms linear; +} +.headroom--pinned { + transform: translateY(0%); +} +.headroom--unpinned { + transform: translateY(-100%); +} + /* mark.js ----------------------------*/ mark { @@ -234,3 +344,41 @@ mark { .html-widget { margin-bottom: 10px; } + +/* fontawesome ------------------------ */ + +.fab { + font-family: "Font Awesome 5 Brands" !important; +} + +/* don't display links in code chunks when printing */ +/* source: https://stackoverflow.com/a/10781533 */ +@media print { + code a:link:after, code a:visited:after { + content: ""; + } +} + +/* Section anchors --------------------------------- + Added in pandoc 2.11: https://github.com/jgm/pandoc-templates/commit/9904bf71 +*/ + +div.csl-bib-body { } +div.csl-entry { + clear: both; +} +.hanging-indent div.csl-entry { + margin-left:2em; + text-indent:-2em; +} +div.csl-left-margin { + min-width:2em; + float:left; +} +div.csl-right-inline { + margin-left:2em; + padding-left:1em; +} +div.csl-indent { + margin-left: 2em; +} diff --git a/docs/pkgdown.js b/docs/pkgdown.js index 706ad58..6f0eee4 100644 --- a/docs/pkgdown.js +++ b/docs/pkgdown.js @@ -2,18 +2,11 @@ (function($) { $(function() { - $("#sidebar") - .stick_in_parent({offset_top: 40}) - .on('sticky_kit:bottom', function(e) { - $(this).parent().css('position', 'static'); - }) - .on('sticky_kit:unbottom', function(e) { - $(this).parent().css('position', 'relative'); - }); + $('.navbar-fixed-top').headroom(); - $('body').scrollspy({ - target: '#sidebar', - offset: 60 + $('body').css('padding-top', $('.navbar').height() + 10); + $(window).resize(function(){ + $('body').css('padding-top', $('.navbar').height() + 10); }); $('[data-toggle="tooltip"]').tooltip(); @@ -25,6 +18,10 @@ for (var i = 0; i < links.length; i++) { if (links[i].getAttribute("href") === "#") continue; + // Ignore external links + if (links[i].host !== location.host) + continue; + var nav_path = paths(links[i].pathname); var length = prefix_length(nav_path, cur_path); @@ -52,13 +49,14 @@ return(pieces); } + // Returns -1 if not found function prefix_length(needle, haystack) { if (needle.length > haystack.length) - return(0); + return(-1); // Special case for length-0 haystack, since for loop won't run if (haystack.length === 0) { - return(needle.length === 0 ? 1 : 0); + return(needle.length === 0 ? 0 : -1); } for (var i = 0; i < haystack.length; i++) { @@ -82,7 +80,7 @@ $(document).ready(function() { var copyButton = ""; - $(".examples, div.sourceCode").addClass("hasCopyButton"); + $("div.sourceCode").addClass("hasCopyButton"); // Insert copy buttons: $(copyButton).prependTo(".hasCopyButton"); @@ -93,7 +91,7 @@ // Initialize clipboard: var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { text: function(trigger) { - return trigger.parentNode.textContent; + return trigger.parentNode.textContent.replace(/\n#>[^\n]*/g, ""); } }); diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index ae3eb50..611a330 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,6 +1,10 @@ -pandoc: 2.3.1 -pkgdown: 1.2.0 +pandoc: 2.16.1 +pkgdown: 2.0.2.9000 pkgdown_sha: ~ articles: why_hrbrthemes: why_hrbrthemes.html +last_built: 2022-02-11T23:35Z +urls: + reference: https://cinc.rud.is/web/packages/hrbrthemes/reference + article: https://cinc.rud.is/web/packages/hrbrthemes/articles diff --git a/docs/reference/ArialNarrow.html b/docs/reference/ArialNarrow.html index a86ffb7..73a69a3 100644 --- a/docs/reference/ArialNarrow.html +++ b/docs/reference/ArialNarrow.html @@ -1,58 +1,12 @@ - - - - - - - -Arial Narrow font name R variable aliases — font_an • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Arial Narrow font name R variable aliases — font_an • hrbrthemes - - - + + -
    -
    - -
    -
    +
    -

    font_an == "Arial Narrow"

    -
    -
    font_an
    - -

    Format

    +
    +
    font_an
    +
    +
    +

    Format

    length 1 character vector

    - - -
    -
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/EconSansCondensed.html b/docs/reference/EconSansCondensed.html new file mode 100644 index 0000000..915550c --- /dev/null +++ b/docs/reference/EconSansCondensed.html @@ -0,0 +1,114 @@ + +Econ Sans Condensed font name R variable aliases — font_es • hrbrthemes + + +
    +
    + + + +
    +
    + + +
    +

    font_es == "EconSansCndLig"

    +

    font_es_bold == "EconSansCndBol"

    +

    font_es_light == "EconSansCndLig"

    +
    + +
    +
    font_es
    +
    +font_es_bold
    +
    +font_es_light
    +
    + +
    +

    Format

    +

    length 1 character vector

    +

    An object of class character of length 1.

    +

    An object of class character of length 1.

    +
    +
    +

    Note

    +

    font_es_bold (a.k.a. "EconSansCndBol") is not available on +Windows and will throw a warning if used in plots.

    +

    font_es_light (a.k.a. "EconSansCndLig") is not available on +Windows and will throw a warning if used in plots.

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.0.2.9000.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/GoldmanSans.html b/docs/reference/GoldmanSans.html new file mode 100644 index 0000000..7f97dcd --- /dev/null +++ b/docs/reference/GoldmanSans.html @@ -0,0 +1,97 @@ + +Goldman Sans font name R variable aliases — font_gs • hrbrthemes + + +
    +
    + + + +
    +
    + + +
    +

    font_gs == "Goldman Sans Condensed"

    +
    + +
    +
    font_gs
    +
    + +
    +

    Format

    +

    length 1 character vector

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.0.2.9000.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/Inter.html b/docs/reference/Inter.html new file mode 100644 index 0000000..b50e6aa --- /dev/null +++ b/docs/reference/Inter.html @@ -0,0 +1,127 @@ + +Inter font name R variable aliases — font_inter_thin • hrbrthemes + + +
    +
    + + + +
    +
    + + +
    +

    font_inter_thin == "Inter-Thin"

    +

    font_inter_thin_italic == "Inter-ThinItalic"

    +

    font_inter_medium == "Inter-Medium"

    +

    font_inter_medium_italic == "Inter-MediumItalic"

    +

    font_inter_semibold == "Inter-SemiBold"

    +

    font_inter_bold == "Inter-Bold"

    +

    font_inter_italic == "Inter-Italic"

    +
    + +
    +
    font_inter_thin
    +
    +font_inter_thin_italic
    +
    +font_inter_medium
    +
    +font_inter_medium_italic
    +
    +font_inter_semibold
    +
    +font_inter_bold
    +
    +font_inter_italic
    +
    + +
    +

    Format

    +

    length 1 character vector

    +

    length 1 character vector

    +

    length 1 character vector

    +

    length 1 character vector

    +

    length 1 character vector

    +

    length 1 character vector

    +

    length 1 character vector

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.0.2.9000.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/PlexSans.html b/docs/reference/PlexSans.html index d03088d..2a59d13 100644 --- a/docs/reference/PlexSans.html +++ b/docs/reference/PlexSans.html @@ -1,59 +1,13 @@ - - - - - - - -PlexSans font name R variable aliases — font_ps • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PlexSans font name R variable aliases — font_ps • hrbrthemes - - - + + -
    -
    - -
    -
    +
    -

    font_ps == "IBMPlexSans"

    font_ps_light == "IBMPlexSans-Light"

    -
    -
    font_ps
    +    
    +
    font_ps
     
    -font_ps_light
    - -

    Format

    +font_ps_light
    +
    +
    +

    Format

    length 1 character vector

    - -

    Note

    - +

    An object of class character of length 1.

    +
    +
    +

    Note

    font_ps_light (a.k.a. "IBMPlexSans-Light") is not available on Windows and will throw a warning if used in plots.

    - - -
    -
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/PublicSans.html b/docs/reference/PublicSans.html new file mode 100644 index 0000000..089cc7f --- /dev/null +++ b/docs/reference/PublicSans.html @@ -0,0 +1,117 @@ + +Public Sans font name R variable aliases — font_pub • hrbrthemes + + +
    +
    + + + +
    +
    + + +
    +

    font_pub == "Public Sans"

    +

    font_pub_bold == "Public Sans Bold"

    +

    font_pub_light == "Public Sans Light"

    +

    font_pub_thin == "Public Sans Thin"

    +
    + +
    +
    font_pub
    +
    +font_pub_bold
    +
    +font_pub_light
    +
    +font_pub_thin
    +
    + +
    +

    Format

    +

    length 1 character vector

    +

    An object of class character of length 1.

    +

    An object of class character of length 1.

    +

    An object of class character of length 1.

    +
    +
    +

    Note

    +

    font_pub_bold (a.k.a. "Public Sans Bold") is not available on +Windows and will throw a warning if used in plots.

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.0.2.9000.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/RobotoCondensed.html b/docs/reference/RobotoCondensed.html index a30d110..d082f35 100644 --- a/docs/reference/RobotoCondensed.html +++ b/docs/reference/RobotoCondensed.html @@ -1,59 +1,13 @@ - - - - - - - -Roboto Condensed font name R variable aliases — font_rc • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Roboto Condensed font name R variable aliases — font_rc • hrbrthemes - - - + + -
    -
    - -
    -
    +
    -

    font_rc == "Roboto Condensed"

    font_fc_light == "Roboto Condensed Light"

    -
    -
    font_rc
    +    
    +
    font_rc
     
    -font_rc_light
    - -

    Format

    +font_rc_light
    +
    +
    +

    Format

    length 1 character vector

    - -

    Note

    - +

    An object of class character of length 1.

    +
    +
    +

    Note

    font_rc_light (a.k.a. "Roboto Condensed Light") is not available on Windows and will throw a warning if used in plots.

    - - -
    -
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/Rplot001.png b/docs/reference/Rplot001.png new file mode 100644 index 0000000..17a3580 Binary files /dev/null and b/docs/reference/Rplot001.png differ diff --git a/docs/reference/TinyHand.html b/docs/reference/TinyHand.html new file mode 100644 index 0000000..16ef0bf --- /dev/null +++ b/docs/reference/TinyHand.html @@ -0,0 +1,97 @@ + +TinyHand Web font name R variable aliases — font_th • hrbrthemes + + +
    +
    + + + +
    +
    + + +
    +

    font_th == "BF Tiny Hand"

    +
    + +
    +
    font_th
    +
    + +
    +

    Format

    +

    length 1 character vector

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.0.2.9000.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/TitilliumWeb.html b/docs/reference/TitilliumWeb.html index 49fa661..0f672ee 100644 --- a/docs/reference/TitilliumWeb.html +++ b/docs/reference/TitilliumWeb.html @@ -1,60 +1,14 @@ - - - - - - - -Titillium Web font name R variable aliases — font_tw • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Titillium Web font name R variable aliases — font_tw • hrbrthemes - - - + + -
    -
    - -
    -
    +
    -

    font_tw == "Titillium Web"

    font_tw_light == "Titillium Web Bold"

    font_tw_light == "Titillium Web Light"

    -
    -
    font_tw
    +    
    +
    font_tw
     
    -font_tw_bold
    +font_tw_bold
     
    -font_tw_light
    - -

    Format

    +font_tw_light
    +
    +
    +

    Format

    length 1 character vector

    - -

    Note

    - +

    An object of class character of length 1.

    +

    An object of class character of length 1.

    +
    +
    +

    Note

    font_tw_light (a.k.a. "Titillium Web Bold") is not available on Windows and will throw a warning if used in plots.

    font_tw_light (a.k.a. "Titillium Web Light") is not available on Windows and will throw a warning if used in plots.

    - - -
    -
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/figures/README-an-1.png b/docs/reference/figures/README-an-1.png new file mode 100644 index 0000000..5d620ab Binary files /dev/null and b/docs/reference/figures/README-an-1.png differ diff --git a/docs/reference/figures/README-ax1-1.png b/docs/reference/figures/README-ax1-1.png new file mode 100644 index 0000000..89b3885 Binary files /dev/null and b/docs/reference/figures/README-ax1-1.png differ diff --git a/docs/reference/figures/README-ax2-1.png b/docs/reference/figures/README-ax2-1.png new file mode 100644 index 0000000..d78747a Binary files /dev/null and b/docs/reference/figures/README-ax2-1.png differ diff --git a/docs/reference/figures/README-ax3-1.png b/docs/reference/figures/README-ax3-1.png new file mode 100644 index 0000000..7549b2e Binary files /dev/null and b/docs/reference/figures/README-ax3-1.png differ diff --git a/docs/reference/figures/README-ft-1.png b/docs/reference/figures/README-ft-1.png new file mode 100644 index 0000000..3b3d6bb Binary files /dev/null and b/docs/reference/figures/README-ft-1.png differ diff --git a/docs/reference/figures/README-ps-1.png b/docs/reference/figures/README-ps-1.png new file mode 100644 index 0000000..f133791 Binary files /dev/null and b/docs/reference/figures/README-ps-1.png differ diff --git a/docs/reference/figures/README-rc-1.png b/docs/reference/figures/README-rc-1.png new file mode 100644 index 0000000..733f237 Binary files /dev/null and b/docs/reference/figures/README-rc-1.png differ diff --git a/docs/reference/figures/README-sc-1.png b/docs/reference/figures/README-sc-1.png new file mode 100644 index 0000000..84d5fa3 Binary files /dev/null and b/docs/reference/figures/README-sc-1.png differ diff --git a/docs/reference/figures/README-sp-1.png b/docs/reference/figures/README-sp-1.png new file mode 100644 index 0000000..de49270 Binary files /dev/null and b/docs/reference/figures/README-sp-1.png differ diff --git a/docs/reference/figures/README-tw-1.png b/docs/reference/figures/README-tw-1.png new file mode 100644 index 0000000..889d1ce Binary files /dev/null and b/docs/reference/figures/README-tw-1.png differ diff --git a/docs/reference/flush_ticks.html b/docs/reference/flush_ticks.html index 7c64bc5..af1b906 100644 --- a/docs/reference/flush_ticks.html +++ b/docs/reference/flush_ticks.html @@ -1,64 +1,18 @@ - - - - - - - -Makes axis text labels flush on the ends — flush_ticks • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - -Makes axis text labels flush on the ends — flush_ticks • hrbrthemes - - - - - - - - - - - - + + -
    -
    - -
    -
    +
    - -

    A covenience function intended for basic, fixed-scale plots only (i.e. does not handle -free scales in facets).
    -
    +

    A convenience function intended for basic, fixed-scale plots only (i.e. does not handle +free scales in facets).

    You need to pass in a ggplot2 object to this function. It can't be +'d in a chain of geoms, coords, scales, themes, etc. It also builds the plot (but does not display -it) so if the plt takes a while (i.e. has lots of data or transforms) this will also +it) so if the plot takes a while (i.e. has lots of data or transforms) this will also take a while.

    -
    -
    flush_ticks(gg, flush = "XY", plot = TRUE, cat = TRUE)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - -
    gg

    ggplot2 plot object

    flush

    either "X" or "Y" or "XY" to flush individual or both axes. Default: both.

    plot

    if FALSE then the ggplot object will be returned invisibly

    cat

    if TRUE then display theme() statements and copy them to the clipboard

    - -

    Value

    - -

    ggplot2 object with theme() elements added

    - -

    Note

    +
    +
    flush_ticks(gg, flush = "XY", plot = TRUE, cat = TRUE)
    +
    +
    +

    Arguments

    +
    gg
    +

    ggplot2 plot object

    +
    flush
    +

    either "X" or "Y" or "XY" to flush individual or both axes. Default: both.

    +
    plot
    +

    if FALSE then the ggplot object will be returned invisibly

    +
    cat
    +

    if TRUE then display theme() statements and copy them to the clipboard

    +
    +
    +

    Value

    +

    ggplot2 object with theme() elements added

    +
    +
    +

    Note

    Intended for basic, fixed-scale plots only (i.e. does not handle free scales in facets).

    - - -
    -
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/ft_cols.html b/docs/reference/ft_cols.html index c91b5e3..3536b4d 100644 --- a/docs/reference/ft_cols.html +++ b/docs/reference/ft_cols.html @@ -1,58 +1,12 @@ - - - - - - - -FT color palette — ft_cols • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -FT color palette — ft_cols • hrbrthemes - - - + + -
    -
    - -
    -
    +
    -

    FT color palette

    -
    -
    ft_cols
    +    
    +
    ft_cols
     
    -ft_text_col
    - -

    Format

    +ft_text_col
    +
    +
    +

    Format

    An object of class list of length 9.

    - -

    Note

    - -

    don't forget you can use scales::alpha() with these colors

    - - -
    - +
    +

    Note

    +

    don't forget you can use scales::alpha() with these colors

    +
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/ft_geom_defaults.html b/docs/reference/ft_geom_defaults.html index 2704782..e27bff2 100644 --- a/docs/reference/ft_geom_defaults.html +++ b/docs/reference/ft_geom_defaults.html @@ -1,58 +1,12 @@ - - - - - - - -Change geom defaults from black to custom lights for the FT theme — ft_geom_defaults • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Change geom defaults from black to custom lights for the FT theme — ft_geom_defaults • hrbrthemes - - - + + -
    -
    - -
    -
    +
    -

    Change geom defaults from black to custom lights for the FT theme

    -
    -
    ft_geom_defaults()
    - +
    +
    ft_geom_defaults()
    +
    -
    - +
    -
    - + +
    + + + - - + diff --git a/docs/reference/ft_pal-1.png b/docs/reference/ft_pal-1.png index 6e30ea0..c75c28c 100644 Binary files a/docs/reference/ft_pal-1.png and b/docs/reference/ft_pal-1.png differ diff --git a/docs/reference/ft_pal.html b/docs/reference/ft_pal.html index 6a8d040..f21a677 100644 --- a/docs/reference/ft_pal.html +++ b/docs/reference/ft_pal.html @@ -1,58 +1,12 @@ - - - - - - - -A bright qualitative color palette — ft_pal • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -A bright qualitative color palette — ft_pal • hrbrthemes - - - + + -
    -
    - -
    -
    +
    -

    A bright qualitative color palette

    -
    -
    ft_pal()
    - +
    +
    ft_pal()
    +
    -

    Examples

    -
    library(scales) -scales::show_col(ft_pal()(8))
    -
    - +
    -
    - + +
    + + + - - + diff --git a/docs/reference/gg_check-1.png b/docs/reference/gg_check-1.png index 5ffc45b..7b668e8 100644 Binary files a/docs/reference/gg_check-1.png and b/docs/reference/gg_check-1.png differ diff --git a/docs/reference/gg_check.html b/docs/reference/gg_check.html index 9e03b94..b1e6452 100644 --- a/docs/reference/gg_check.html +++ b/docs/reference/gg_check.html @@ -1,59 +1,13 @@ - - - - - - - -Spell check ggplot2 plot labels — gg_check • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Spell check ggplot2 plot labels — gg_check • hrbrthemes - - - + + -
    -
    - -
    -
    +
    -

    Due to the way ggplot2 objects are created, this has to be used in a standalone context.

    -
    -
    gg_check(gg, dict, ignore)
    - -

    Arguments

    - - - - - - - - - - - - - - -
    gg

    ggplot2 object

    dict

    a dictionary object or string which can be passed to hunspell::dictionary. -Defaults to hunspell::dictionary("en_US")

    ignore

    character vector with additional approved words added to the dictionary. -Defaults to hunspell::en_stats

    - -

    Value

    +
    +
    gg_check(gg, dict, ignore)
    +
    +
    +

    Arguments

    +
    gg
    +

    ggplot2 object

    +
    dict
    +

    a dictionary object or string which can be passed to hunspell::dictionary. +Defaults to hunspell::dictionary("en_US")

    +
    ignore
    +

    character vector with additional approved words added to the dictionary. +Defaults to hunspell::en_stats

    +
    +
    +

    Value

    the object that was passed in

    - -

    Details

    - +
    +
    +

    Details

    Current functionality only looks for misspelled words in the labels of ggplot2 objects. When misspelled words are found, a message is printed with the words and the label that they are in. No messages will be printed if there are no misspelled words.

    - - -

    Examples

    -
    library(ggplot2) - -df <- data.frame(x=c(20, 25, 30), y=c(4, 4, 4), txt=c("One", "Two", "Three")) - -# not piping -ggplot(mtcars, aes(mpg, wt)) + - geom_point() + - labs(x="This is some txt", y="This is more text", - title="Thisy is a titlle", - subtitle="This is a subtitley", - caption="This is a captien") -> gg - -gg_check(gg)
    #> Possible misspelled words in [title]: (Thisy, titlle)
    #> Possible misspelled words in [subtitle]: (subtitley)
    #> Possible misspelled words in [caption]: (captien)
    -
    - +
    +

    Examples

    +
    library(ggplot2)
    +
    +df <- data.frame(x=c(20, 25, 30), y=c(4, 4, 4), txt=c("One", "Two", "Three"))
    +
    +# not piping
    +ggplot(mtcars, aes(mpg, wt)) +
    +  geom_point() +
    +  labs(x="This is some txt", y="This is more text",
    +       title="Thisy is a titlle",
    +       subtitle="This is a subtitley",
    +       caption="This is a captien") -> gg
    +
    +gg_check(gg)
    +#> Possible misspelled words in [title]: (Thisy, titlle)
    +#> Possible misspelled words in [subtitle]: (subtitley)
    +#> Possible misspelled words in [caption]: (captien)
    +
    +
    +
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/hrbrthemes-exports.html b/docs/reference/hrbrthemes-exports.html index 422f332..07a929c 100644 --- a/docs/reference/hrbrthemes-exports.html +++ b/docs/reference/hrbrthemes-exports.html @@ -1,60 +1,14 @@ - - - - - - - -hrbrthemes exported operators — hrbrthemes-exports • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - -hrbrthemes exported operators — hrbrthemes-exports • hrbrthemes - - - - - - - - - - - - + + -
    -
    - -
    -
    +
    -

    The following functions are imported and then re-exported from the hrbrthemes package to enable use of the magrittr pipe operator with no additional library calls

    -
    - -
    - +
    -
    - + +
    + + + - - + diff --git a/docs/reference/hrbrthemes.html b/docs/reference/hrbrthemes.html index 11571b6..736f000 100644 --- a/docs/reference/hrbrthemes.html +++ b/docs/reference/hrbrthemes.html @@ -1,59 +1,13 @@ - - - - - - - -Additional Themes and Theme Components for 'ggplot2' — hrbrthemes • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Additional Themes and Theme Components for 'ggplot2' — hrbrthemes • hrbrthemes - - - + + -
    -
    - -
    -
    +
    -

    A compilation of extra themes and theme components for 'ggplot2' with an emphasis on typography.

    -
    - -

    Details

    +
    +

    Details

    The core theme: theme_ipsum ("ipsum" is Latin for "precise") uses Arial Narrow which should be installed on practically any modern system, so it's "free"-ish. This font is condensed, has solid default kerning pairs and geometric numbers. @@ -138,37 +75,42 @@

    Details Narrow (the one on most systems, anyway) does not have said diversity but this quality is not (IMO) a "must have".

    There is an option hrbrthemes.loadfonts which -- if set to TRUE -- will -call extrafont::loadfonts() to register non-core fonts with R PDF & PostScript +call extrafont::loadfonts() to register non-core fonts with R PDF & PostScript devices. If you are running under Windows, the package calls the same function to register non-core fonts with the Windows graphics device.

    - - -

    - + +

    Author

    Bob Rudis (bob@rud.is)

    +
    +
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/import_econ_sans.html b/docs/reference/import_econ_sans.html new file mode 100644 index 0000000..01721e9 --- /dev/null +++ b/docs/reference/import_econ_sans.html @@ -0,0 +1,107 @@ + +Import Roboto Condensed font for use in charts — import_econ_sans • hrbrthemes + + +
    +
    + + + +
    +
    + + +
    +

    Roboto Condensed is a trademark of Google.

    +
    + +
    +
    import_econ_sans()
    +
    + +
    +

    Details

    +

    There is an option hrbrthemes.loadfonts which -- if set to TRUE -- will +call extrafont::loadfonts() to register non-core fonts with R PDF & PostScript +devices. If you are running under Windows, the package calls the same function +to register non-core fonts with the Windows graphics device.

    +
    +
    +

    Note

    +

    This will take care of ensuring PDF/PostScript usage. The location of the +font directory is displayed after the base import is complete. It is highly +recommended that you install them on your system the same way you would any +other font you wish to use in other programs.

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.0.2.9000.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/import_goldman_sans.html b/docs/reference/import_goldman_sans.html new file mode 100644 index 0000000..ccb9665 --- /dev/null +++ b/docs/reference/import_goldman_sans.html @@ -0,0 +1,109 @@ + +Import Goldman Sans font for use in charts — import_goldman_sans • hrbrthemes + + +
    +
    + + + +
    +
    + + +
    +

    Goldman Sans is a trademark of Goldman Sachs and distributed under the +Goldman Sachs Restricted Font License.

    +
    + +
    +
    import_goldman_sans()
    +
    + +
    +

    Details

    +

    There is an option hrbrthemes.loadfonts which -- if set to TRUE -- will +call extrafont::loadfonts() to register non-core fonts with R PDF & PostScript +devices. If you are running under Windows, the package calls the same function +to register non-core fonts with the Windows graphics device.

    +
    +
    +

    Note

    +

    This will take care of ensuring PDF/PostScript usage. The location of the +font directory is displayed after the base import is complete. It is highly +recommended that you install them on your system the same way you would any +other font you wish to use in other programs.

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.0.2.9000.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/import_inter.html b/docs/reference/import_inter.html new file mode 100644 index 0000000..97e93c5 --- /dev/null +++ b/docs/reference/import_inter.html @@ -0,0 +1,109 @@ + +Import Inter font for use in charts — import_inter • hrbrthemes + + +
    +
    + + + +
    +
    + + +
    +

    Inter is Copyright (c) 2016-2020 The Inter Project Authors +(https://rsms.me/inter/).

    +
    + +
    +
    import_inter()
    +
    + +
    +

    Details

    +

    There is an option hrbrthemes.loadfonts which -- if set to TRUE -- will +call extrafont::loadfonts() to register non-core fonts with R PDF & PostScript +devices. If you are running under Windows, the package calls the same function +to register non-core fonts with the Windows graphics device.

    +
    +
    +

    Note

    +

    This will take care of ensuring PDF/PostScript usage. The location of the +font directory is displayed after the base import is complete. It is highly +recommended that you install them on your system the same way you would any +other font you wish to use in other programs.

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.0.2.9000.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/import_plex_sans.html b/docs/reference/import_plex_sans.html index 9be007c..c91c740 100644 --- a/docs/reference/import_plex_sans.html +++ b/docs/reference/import_plex_sans.html @@ -1,58 +1,12 @@ - - - - - - - -Import IBM Plex Sans font for use in charts — import_plex_sans • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Import IBM Plex Sans font for use in charts — import_plex_sans • hrbrthemes - - - + + -
    -
    - -
    -
    +
    -

    IBM Plex Sans is a trademark of IBM and distributed under the SIL Open Font License, Version 1.1.

    -
    -
    import_plex_sans()
    - -

    Details

    +
    +
    import_plex_sans()
    +
    +
    +

    Details

    There is an option hrbrthemes.loadfonts which -- if set to TRUE -- will -call extrafont::loadfonts() to register non-core fonts with R PDF & PostScript +call extrafont::loadfonts() to register non-core fonts with R PDF & PostScript devices. If you are running under Windows, the package calls the same function to register non-core fonts with the Windows graphics device.

    - -

    Note

    - +
    +
    +

    Note

    This will take care of ensuring PDF/PostScript usage. The location of the font directory is displayed after the base import is complete. It is highly recommended that you install them on your system the same way you would any other font you wish to use in other programs.

    - - -
    -
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/import_public_sans.html b/docs/reference/import_public_sans.html new file mode 100644 index 0000000..a889e54 --- /dev/null +++ b/docs/reference/import_public_sans.html @@ -0,0 +1,109 @@ + +Import Public Sans font for use in charts — import_public_sans • hrbrthemes + + +
    +
    + + + +
    +
    + + +
    +

    Public Sans is Copyright 2015 Impallari Type and licensed under the +SIL Open Font License, Version 1.1

    +
    + +
    +
    import_public_sans()
    +
    + +
    +

    Details

    +

    There is an option hrbrthemes.loadfonts which -- if set to TRUE -- will +call extrafont::loadfonts() to register non-core fonts with R PDF & PostScript +devices. If you are running under Windows, the package calls the same function +to register non-core fonts with the Windows graphics device.

    +
    +
    +

    Note

    +

    This will take care of ensuring PDF/PostScript usage. The location of the +font directory is displayed after the base import is complete. It is highly +recommended that you install them on your system the same way you would any +other font you wish to use in other programs.

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.0.2.9000.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/import_roboto_condensed.html b/docs/reference/import_roboto_condensed.html index f73429b..e58bee4 100644 --- a/docs/reference/import_roboto_condensed.html +++ b/docs/reference/import_roboto_condensed.html @@ -1,58 +1,12 @@ - - - - - - - -Import Roboto Condensed font for use in charts — import_roboto_condensed • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Import Roboto Condensed font for use in charts — import_roboto_condensed • hrbrthemes - - - + + -
    -
    - -
    -
    +
    -

    Roboto Condensed is a trademark of Google.

    -
    -
    import_roboto_condensed()
    - -

    Details

    +
    +
    import_roboto_condensed()
    +
    +
    +

    Details

    There is an option hrbrthemes.loadfonts which -- if set to TRUE -- will -call extrafont::loadfonts() to register non-core fonts with R PDF & PostScript +call extrafont::loadfonts() to register non-core fonts with R PDF & PostScript devices. If you are running under Windows, the package calls the same function to register non-core fonts with the Windows graphics device.

    - -

    Note

    - +
    +
    +

    Note

    This will take care of ensuring PDF/PostScript usage. The location of the font directory is displayed after the base import is complete. It is highly recommended that you install them on your system the same way you would any other font you wish to use in other programs.

    - - -
    -
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/import_tinyhand.html b/docs/reference/import_tinyhand.html new file mode 100644 index 0000000..16eff86 --- /dev/null +++ b/docs/reference/import_tinyhand.html @@ -0,0 +1,107 @@ + +Import Titillium Web font for use in charts — import_tinyhand • hrbrthemes + + +
    +
    + + + +
    +
    + + +
    +

    Titillium Web is a trademark of Google.

    +
    + +
    +
    import_tinyhand()
    +
    + +
    +

    Details

    +

    There is an option hrbrthemes.loadfonts which -- if set to TRUE -- will +call extrafont::loadfonts() to register non-core fonts with R PDF & PostScript +devices. If you are running under Windows, the package calls the same function +to register non-core fonts with the Windows graphics device.

    +
    +
    +

    Note

    +

    This will take care of ensuring PDF/PostScript usage. The location of the +font directory is displayed after the base import is complete. It is highly +recommended that you install them on your system the same way you would any +other font you wish to use in other programs.

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.0.2.9000.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/import_titillium_web.html b/docs/reference/import_titillium_web.html index 505c414..1c8df81 100644 --- a/docs/reference/import_titillium_web.html +++ b/docs/reference/import_titillium_web.html @@ -1,58 +1,12 @@ - - - - - - - -Import Titillium Web font for use in charts — import_titillium_web • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Import Titillium Web font for use in charts — import_titillium_web • hrbrthemes - - - + + -
    -
    - -
    -
    +
    -

    Titillium Web is a trademark of Google.

    -
    -
    import_titillium_web()
    - -

    Details

    +
    +
    import_titillium_web()
    +
    +
    +

    Details

    There is an option hrbrthemes.loadfonts which -- if set to TRUE -- will -call extrafont::loadfonts() to register non-core fonts with R PDF & PostScript +call extrafont::loadfonts() to register non-core fonts with R PDF & PostScript devices. If you are running under Windows, the package calls the same function to register non-core fonts with the Windows graphics device.

    - -

    Note

    - +
    +
    +

    Note

    This will take care of ensuring PDF/PostScript usage. The location of the font directory is displayed after the base import is complete. It is highly recommended that you install them on your system the same way you would any other font you wish to use in other programs.

    - - -
    -
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/index.html b/docs/reference/index.html index 1833a7e..afd8be6 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -1,55 +1,12 @@ - - - - - - - -Function reference • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Function reference • hrbrthemes + + - - - -
    -
    - -
    -
    +
    - - - - - - - - - - -
    -

    All functions

    + - - - - - - - + + + + + + - - - + + - - - + + - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - + + - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - + - - - + + + + + + - - - - + + + - - - - + - - - - + + + - - -
    +

    All functions

    +

    font_an

    Arial Narrow font name R variable aliases

    +
    +

    font_es font_es_bold font_es_light

    +

    Econ Sans Condensed font name R variable aliases

    +

    font_gs

    +

    Goldman Sans font name R variable aliases

    +

    font_inter_thin font_inter_thin_italic font_inter_medium font_inter_medium_italic font_inter_semibold font_inter_bold font_inter_italic

    +

    Inter font name R variable aliases

    font_ps font_ps_light

    PlexSans font name R variable aliases

    +
    +

    font_pub font_pub_bold font_pub_light font_pub_thin

    +

    Public Sans font name R variable aliases

    font_rc font_rc_light

    Roboto Condensed font name R variable aliases

    +
    +

    font_th

    +

    TinyHand Web font name R variable aliases

    font_tw font_tw_bold font_tw_light

    Titillium Web font name R variable aliases

    +

    flush_ticks()

    Makes axis text labels flush on the ends

    +

    ft_cols ft_text_col

    FT color palette

    +

    ft_geom_defaults()

    Change geom defaults from black to custom lights for the FT theme

    +

    ft_pal()

    A bright qualitative color palette

    +

    gg_check()

    Spell check ggplot2 plot labels

    +

    hrbrthemes-exports

    hrbrthemes exported operators

    +
    +

    import_econ_sans()

    +

    Import Roboto Condensed font for use in charts

    +

    import_goldman_sans()

    +

    Import Goldman Sans font for use in charts

    +

    import_inter()

    +

    Import Inter font for use in charts

    import_plex_sans()

    Import IBM Plex Sans font for use in charts

    +
    +

    import_public_sans()

    +

    Import Public Sans font for use in charts

    import_roboto_condensed()

    Import Roboto Condensed font for use in charts

    +
    +

    import_tinyhand()

    +

    Import Titillium Web font for use in charts

    import_titillium_web()

    Import Titillium Web font for use in charts

    +

    ipsum()

    ipsum R markdown template

    +

    ipsum_pal()

    A muted, qualitative color palette

    +

    ipsum_pdf()

    ipsum R markdown template for PDF output

    +

    modern_geom_defaults()

    Change geom defaults from black to white for the modern theme

    +

    scale_colour_ft() scale_color_ft() scale_fill_ft()

    Discrete color & fill scales based on the FT palette

    +

    scale_colour_ipsum() scale_color_ipsum() scale_fill_ipsum()

    Discrete color & fill scales based on the ipsum palette

    +

    scale_x_percent() scale_y_percent() scale_x_comma() scale_y_comma()

    X & Y scales with opinionated pre-sets for percent & comma label formats

    +

    X & Y scales with opinionated presets for percent & comma label formats

    theme_ipsum()

    A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typography

    +
    +

    theme_ipsum_es()

    +

    A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typography

    +

    theme_ipsum_gs()

    +

    A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typography

    +

    theme_ipsum_inter()

    +

    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

    +

    A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typography

    +

    theme_ipsum_pub()

    +

    A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typography

    theme_ft_rc() theme_modern_rc() theme_ipsum_rc()

    A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typoghraphy

    +

    A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typography

    theme_ipsum_tw()

    A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typoghraphy

    +

    A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typography

    +

    theme_tinyhand()

    +

    Something you should never use.

    update_geom_font_defaults()

    Update matching font defaults for text geoms

    - +
    - +
    -
    - + +
    + + + - - + diff --git a/docs/reference/ipsum.html b/docs/reference/ipsum.html index 40ab056..6c4e900 100644 --- a/docs/reference/ipsum.html +++ b/docs/reference/ipsum.html @@ -1,58 +1,12 @@ - - - - - - - -ipsum R markdown template — ipsum • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -ipsum R markdown template — ipsum • hrbrthemes - - - + + -
    -
    - -
    -
    +
    -

    Template for creating an R markdown document with an emphasis on typography

    -
    -
    ipsum(number_sections = FALSE, fig_width = 7, fig_height = 5,
    -  fig_retina = if (!fig_caption) 2, fig_caption = FALSE, dev = "png",
    -  smart = TRUE, self_contained = TRUE, highlight = "default",
    -  mathjax = "default", extra_dependencies = NULL, css = NULL,
    -  includes = NULL, keep_md = FALSE, lib_dir = NULL,
    -  md_extensions = NULL, pandoc_args = NULL, toc = FALSE,
    -  toc_depth = 2, ...)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    number_sections

    TRUE to number section headings

    fig_width

    Default width (in inches) for figures

    fig_height

    Default height (in inches) for figures

    fig_retina

    Scaling to perform for retina displays (defaults to 2, which +

    +
    ipsum(
    +  number_sections = FALSE,
    +  fig_width = 7,
    +  fig_height = 5,
    +  fig_retina = if (!fig_caption) 2,
    +  fig_caption = FALSE,
    +  dev = "png",
    +  smart = TRUE,
    +  self_contained = TRUE,
    +  highlight = "default",
    +  mathjax = "default",
    +  extra_dependencies = NULL,
    +  css = NULL,
    +  includes = NULL,
    +  keep_md = FALSE,
    +  lib_dir = NULL,
    +  md_extensions = NULL,
    +  pandoc_args = NULL,
    +  toc = FALSE,
    +  toc_depth = 2,
    +  ...
    +)
    +
    + +
    +

    Arguments

    +
    number_sections
    +

    TRUE to number section headings

    +
    fig_width
    +

    Default width (in inches) for figures

    +
    fig_height
    +

    Default height (in inches) for figures

    +
    fig_retina
    +

    Scaling to perform for retina displays (defaults to 2, which currently works for all widely used retina displays). Set to NULL to prevent retina scaling. Note that this will always be NULL when keep_md is specified (this is because fig_retina relies on -outputting HTML directly into the markdown document).

    fig_caption

    TRUE to render figures with captions

    dev

    Graphics device to use for figure output (defaults to png)

    smart

    Produce typographically correct output, converting straight -quotes to curly quotes, --- to em-dashes, -- to en-dashes, and ... to -ellipses.

    self_contained

    Produce a standalone HTML file with no external +outputting HTML directly into the markdown document).

    +
    fig_caption
    +

    TRUE to render figures with captions

    +
    dev
    +

    Graphics device to use for figure output (defaults to png)

    +
    smart
    +

    Deprecated

    +
    self_contained
    +

    Produce a standalone HTML file with no external dependencies, using data: URIs to incorporate the contents of linked scripts, stylesheets, images, and videos. Note that even for self contained documents MathJax is still loaded externally (this is necessary because of -its size).

    highlight

    Syntax highlighting style. Supported styles include +its size).

    +
    highlight
    +

    Syntax highlighting style. Supported styles include "default", "tango", "pygments", "kate", "monochrome", "espresso", "zenburn", -"haddock", and "textmate". Pass NULL to prevent syntax highlighting.

    mathjax

    Include mathjax. The "default" option uses an https URL from a +"haddock", and "textmate". Pass NULL to prevent syntax highlighting.

    +
    mathjax
    +

    Include mathjax. The "default" option uses an https URL from a MathJax CDN. The "local" option uses a local version of MathJax (which is copied into the output directory). You can pass an alternate URL or pass -NULL to exclude MathJax entirely.

    extra_dependencies, ...

    Additional function arguments to pass to the -base R Markdown HTML output formatter

    css

    One or more css files to include

    includes

    Named list of additional content to include within the -document (typically created using the includes function).

    keep_md

    Keep the markdown file generated by knitting.

    lib_dir

    Directory to copy dependent HTML libraries (e.g. jquery, +NULL to exclude MathJax entirely.

    +
    extra_dependencies, ...
    +

    Additional function arguments to pass to the +base R Markdown HTML output formatter

    +
    css
    +

    CSS and/or Sass files to include. Files with an extension of .sass +or .scss are compiled to CSS via sass::sass(). Also, if theme is a +bslib::bs_theme() object, Sass code may reference the relevant Bootstrap +Sass variables, functions, mixins, etc.

    +
    includes
    +

    Named list of additional content to include within the +document (typically created using the includes function).

    +
    keep_md
    +

    Keep the markdown file generated by knitting.

    +
    lib_dir
    +

    Directory to copy dependent HTML libraries (e.g. jquery, bootstrap, etc.) into. By default this will be the name of the document with -_files appended to it.

    md_extensions

    Markdown extensions to be added or removed from the -default definition or R Markdown. See the rmarkdown_format for -additional details.

    pandoc_args

    Additional command line options to pass to pandoc

    toc, toc_depth

    TOC params

    - - -
    -
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/ipsum_pal-1.png b/docs/reference/ipsum_pal-1.png index f52ab75..c7d1430 100644 Binary files a/docs/reference/ipsum_pal-1.png and b/docs/reference/ipsum_pal-1.png differ diff --git a/docs/reference/ipsum_pal.html b/docs/reference/ipsum_pal.html index d64ca00..87b1b97 100644 --- a/docs/reference/ipsum_pal.html +++ b/docs/reference/ipsum_pal.html @@ -1,58 +1,12 @@ - - - - - - - -A muted, qualitative color palette — ipsum_pal • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -A muted, qualitative color palette — ipsum_pal • hrbrthemes - - - + + -
    -
    - -
    -
    +
    -

    A muted, qualitative color palette

    -
    -
    ipsum_pal()
    - +
    +
    ipsum_pal()
    +
    -

    Examples

    -
    library(scales) -scales::show_col(ipsum_pal()(9))
    -
    - +
    -
    - + +
    + + + - - + diff --git a/docs/reference/ipsum_pdf.html b/docs/reference/ipsum_pdf.html index 1ff7927..a5bab4e 100644 --- a/docs/reference/ipsum_pdf.html +++ b/docs/reference/ipsum_pdf.html @@ -1,58 +1,12 @@ - - - - - - - -ipsum R markdown template for PDF output — ipsum_pdf • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -ipsum R markdown template for PDF output — ipsum_pdf • hrbrthemes - - - + + -
    -
    - -
    -
    +
    -

    Template for creating an R markdown documents with an emphasis on typography

    -
    -
    ipsum_pdf(...)
    - -

    Arguments

    - - - - - - -
    ...

    Arguments to rmarkdown::pdf_document

    - -

    Value

    - -

    R Markdown output format to pass to render

    - +
    +
    ipsum_pdf(...)
    +
    -
    - +
    -
    - + +
    + + + - - + diff --git a/docs/reference/modern_geom_defaults.html b/docs/reference/modern_geom_defaults.html index b6a2384..620ee28 100644 --- a/docs/reference/modern_geom_defaults.html +++ b/docs/reference/modern_geom_defaults.html @@ -1,58 +1,12 @@ - - - - - - - -Change geom defaults from black to white for the modern theme — modern_geom_defaults • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Change geom defaults from black to white for the modern theme — modern_geom_defaults • hrbrthemes - - - + + -
    -
    - -
    -
    +
    -

    Change geom defaults from black to white for the modern theme

    -
    -
    modern_geom_defaults()
    - +
    +
    modern_geom_defaults()
    +
    -
    - +
    -
    - + +
    + + + - - + diff --git a/docs/reference/scale_ft.html b/docs/reference/scale_ft.html index 985bde5..7e34326 100644 --- a/docs/reference/scale_ft.html +++ b/docs/reference/scale_ft.html @@ -1,58 +1,12 @@ - - - - - - - -Discrete color & fill scales based on the FT palette — scale_colour_ft • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Discrete color & fill scales based on the FT palette — scale_colour_ft • hrbrthemes - - - + + -
    -
    - -
    -
    +
    - -

    See ft_pal.

    - +

    See ft_pal().

    -
    scale_colour_ft(...)
    +    
    +
    scale_colour_ft(...)
     
    -scale_color_ft(...)
    +scale_color_ft(...)
     
    -scale_fill_ft(...)
    - -

    Arguments

    - - - - - - -
    ...

    Arguments passed on to ggplot2::discrete_scale

    -
    aesthetics

    The names of the aesthetics that this scale works with

    -
    scale_name

    The name of the scale

    -
    palette

    A palette function that when called with a single integer +scale_fill_ft(...) + + +

    +

    Arguments

    +
    ...
    +

    Arguments passed on to ggplot2::discrete_scale

    aesthetics
    +

    The names of the aesthetics that this scale works with.

    + +
    scale_name
    +

    The name of the scale that should be used for error messages +associated with this scale.

    + +
    palette
    +

    A palette function that when called with a single integer argument (the number of levels in the scale) returns the values that -they should take.

    -
    name

    The name of the scale. Used as the axis or legend title. If -waiver(), the default, the name of the scale is taken from the first +they should take (e.g., scales::hue_pal()).

    + +
    name
    +

    The name of the scale. Used as the axis or legend title. If +waiver(), the default, the name of the scale is taken from the first mapping used for that aesthetic. If NULL, the legend title will be omitted.

    -
    breaks

    One of: -

      -
    • NULL for no breaks

    • -
    • waiver() for the default breaks computed by the -transformation object

    • + +
      breaks
      +

      One of:

      • NULL for no breaks

      • +
      • waiver() for the default breaks (the scale limits)

      • A character vector of breaks

      • A function that takes the limits as input and returns breaks -as output

      • -

      -
      labels

      One of: -

        -
      • NULL for no labels

      • -
      • waiver() for the default labels computed by the +as output. Also accepts rlang lambda function +notation.

      • +
      + +
      labels
      +

      One of:

      • NULL for no labels

      • +
      • waiver() for the default labels computed by the transformation object

      • A character vector giving labels (must be same length as breaks)

      • A function that takes the breaks as input and returns labels -as output

      • -

      -
      limits

      A character vector that defines possible values of the scale -and their order.

      -
      na.translate

      Unlike continuous scales, discrete scales can easily show +as output. Also accepts rlang lambda function +notation.

      +
    + +
    limits
    +

    One of:

    • NULL to use the default scale values

    • +
    • A character vector that defines possible values of the scale and their +order

    • +
    • A function that accepts the existing (automatic) values and returns +new ones. Also accepts rlang lambda function +notation.

    • +
    + +
    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 na.translate = FALSE.

    -
    na.value

    If na.translate = TRUE, what value aesthetic -value should missing be displayed as? Does not apply to position scales + +

    na.value
    +

    If na.translate = TRUE, what aesthetic value should the +missing values be displayed as? Does not apply to position scales where NA is always placed at the far right.

    -
    drop

    Should unused factor levels be omitted from the scale? + +

    drop
    +

    Should unused factor levels be omitted from the scale? The default, TRUE, uses the levels that appear in the data; FALSE uses all the levels in the factor.

    -
    guide

    A function used to create a guide or its name. See -guides() for more info.

    -
    super

    The super class to use for the constructed scale

    -
    - -
    -
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/scale_ipsum.html b/docs/reference/scale_ipsum.html index a05386c..ecf956b 100644 --- a/docs/reference/scale_ipsum.html +++ b/docs/reference/scale_ipsum.html @@ -1,58 +1,12 @@ - - - - - - - -Discrete color & fill scales based on the ipsum palette — scale_colour_ipsum • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Discrete color & fill scales based on the ipsum palette — scale_colour_ipsum • hrbrthemes - - - + + -
    -
    - -
    -
    +
    - -

    See ipsum_pal.

    - +

    See ipsum_pal().

    -
    scale_colour_ipsum(...)
    +    
    +
    scale_colour_ipsum(...)
     
    -scale_color_ipsum(...)
    +scale_color_ipsum(...)
     
    -scale_fill_ipsum(...)
    - -

    Arguments

    - - - - - - -
    ...

    Arguments passed on to ggplot2::discrete_scale

    -
    aesthetics

    The names of the aesthetics that this scale works with

    -
    scale_name

    The name of the scale

    -
    palette

    A palette function that when called with a single integer +scale_fill_ipsum(...) + + +

    +

    Arguments

    +
    ...
    +

    Arguments passed on to ggplot2::discrete_scale

    aesthetics
    +

    The names of the aesthetics that this scale works with.

    + +
    scale_name
    +

    The name of the scale that should be used for error messages +associated with this scale.

    + +
    palette
    +

    A palette function that when called with a single integer argument (the number of levels in the scale) returns the values that -they should take.

    -
    name

    The name of the scale. Used as the axis or legend title. If -waiver(), the default, the name of the scale is taken from the first +they should take (e.g., scales::hue_pal()).

    + +
    name
    +

    The name of the scale. Used as the axis or legend title. If +waiver(), the default, the name of the scale is taken from the first mapping used for that aesthetic. If NULL, the legend title will be omitted.

    -
    breaks

    One of: -

      -
    • NULL for no breaks

    • -
    • waiver() for the default breaks computed by the -transformation object

    • + +
      breaks
      +

      One of:

      • NULL for no breaks

      • +
      • waiver() for the default breaks (the scale limits)

      • A character vector of breaks

      • A function that takes the limits as input and returns breaks -as output

      • -

      -
      labels

      One of: -

        -
      • NULL for no labels

      • -
      • waiver() for the default labels computed by the +as output. Also accepts rlang lambda function +notation.

      • +
      + +
      labels
      +

      One of:

      • NULL for no labels

      • +
      • waiver() for the default labels computed by the transformation object

      • A character vector giving labels (must be same length as breaks)

      • A function that takes the breaks as input and returns labels -as output

      • -

      -
      limits

      A character vector that defines possible values of the scale -and their order.

      -
      na.translate

      Unlike continuous scales, discrete scales can easily show +as output. Also accepts rlang lambda function +notation.

      +
    + +
    limits
    +

    One of:

    • NULL to use the default scale values

    • +
    • A character vector that defines possible values of the scale and their +order

    • +
    • A function that accepts the existing (automatic) values and returns +new ones. Also accepts rlang lambda function +notation.

    • +
    + +
    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 na.translate = FALSE.

    -
    na.value

    If na.translate = TRUE, what value aesthetic -value should missing be displayed as? Does not apply to position scales + +

    na.value
    +

    If na.translate = TRUE, what aesthetic value should the +missing values be displayed as? Does not apply to position scales where NA is always placed at the far right.

    -
    drop

    Should unused factor levels be omitted from the scale? + +

    drop
    +

    Should unused factor levels be omitted from the scale? The default, TRUE, uses the levels that appear in the data; FALSE uses all the levels in the factor.

    -
    guide

    A function used to create a guide or its name. See -guides() for more info.

    -
    super

    The super class to use for the constructed scale

    -
    - -
    -
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/scale_x_percent.html b/docs/reference/scale_x_percent.html index fc6ea6a..e35c496 100644 --- a/docs/reference/scale_x_percent.html +++ b/docs/reference/scale_x_percent.html @@ -1,58 +1,12 @@ - - - - - - - -X & Y scales with opinionated pre-sets for percent & comma label formats — scale_x_percent • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -X & Y scales with opinionated presets for percent & comma label formats — scale_x_percent • hrbrthemes - - - + + -
    -
    - -
    -
    +
    -

    The _comma ones set comma format for axis text and expand=c(0,0) (you need to set limits).

    -
    -
    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())
    -
    -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())
    -
    -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())
    +    
    +
    scale_x_percent(
    +  name = waiver(),
    +  breaks = waiver(),
    +  minor_breaks = waiver(),
    +  guide = waiver(),
    +  n.breaks = NULL,
    +  labels,
    +  limits = NULL,
    +  expand = c(0.01, 0),
    +  oob = censor,
    +  na.value = NA_real_,
    +  trans = "identity",
    +  position = "bottom",
    +  sec.axis = waiver(),
    +  accuracy = 1,
    +  scale = 100,
    +  prefix = "",
    +  suffix = "%",
    +  big.mark = " ",
    +  decimal.mark = ".",
    +  trim = TRUE,
    +  ...
    +)
    +
    +scale_y_percent(
    +  name = waiver(),
    +  breaks = waiver(),
    +  minor_breaks = waiver(),
    +  guide = waiver(),
    +  n.breaks = NULL,
    +  labels,
    +  limits = NULL,
    +  expand = c(0.01, 0),
    +  oob = censor,
    +  na.value = NA_real_,
    +  trans = "identity",
    +  position = "left",
    +  sec.axis = waiver(),
    +  accuracy = 1,
    +  scale = 100,
    +  prefix = "",
    +  suffix = "%",
    +  big.mark = " ",
    +  decimal.mark = ".",
    +  trim = TRUE,
    +  ...
    +)
    +
    +scale_x_comma(
    +  name = waiver(),
    +  breaks = waiver(),
    +  minor_breaks = waiver(),
    +  guide = waiver(),
    +  n.breaks = NULL,
    +  labels,
    +  limits = NULL,
    +  expand = c(0.01, 0),
    +  oob = censor,
    +  na.value = NA_real_,
    +  trans = "identity",
    +  position = "bottom",
    +  sec.axis = waiver(),
    +  accuracy = 1,
    +  scale = 1,
    +  prefix = "",
    +  suffix = "",
    +  big.mark = ",",
    +  decimal.mark = ".",
    +  trim = TRUE,
    +  ...
    +)
    +
    +scale_y_comma(
    +  name = waiver(),
    +  breaks = waiver(),
    +  minor_breaks = waiver(),
    +  guide = waiver(),
    +  n.breaks = NULL,
    +  labels,
    +  limits = NULL,
    +  expand = c(0.01, 0),
    +  oob = censor,
    +  na.value = NA_real_,
    +  trans = "identity",
    +  position = "left",
    +  sec.axis = waiver(),
    +  accuracy = 1,
    +  scale = 1,
    +  prefix = "",
    +  suffix = "",
    +  big.mark = ",",
    +  decimal.mark = ".",
    +  trim = TRUE,
    +  ...
    +)
    +
    -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())
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    name

    The name of the scale. Used as axis or legend title. If -waiver(), the default, the name of the scale is taken from the first +

    +

    Arguments

    +
    name
    +

    The name of the scale. Used as axis or legend title. If +waiver(), the default, the name of the scale is taken from the first mapping used for that aesthetic. If NULL, the legend title will be -omitted.

    breaks

    One of:

      -
    • NULL for no breaks

    • -
    • waiver() for the default breaks computed by the +omitted.

      +
      breaks
      +

      One of:

      • NULL for no breaks

      • +
      • waiver() for the default breaks computed by the transformation object

      • A numeric vector of positions

      • A function that takes the limits as input and returns breaks as output

      • -
    minor_breaks

    One of:

      -
    • NULL for no minor breaks

    • -
    • waiver() for the default breaks (one minor break between +

    +
    minor_breaks
    +

    One of:

    • NULL for no minor breaks

    • +
    • waiver() for the default breaks (one minor break between each major break)

    • A numeric vector of positions

    • A function that given the limits returns a vector of minor breaks.

    • -
    labels

    One of:

      -
    • NULL for no labels

    • -
    • waiver() for the default labels computed by the -transformation object

    • -
    • A character vector giving labels (must be same length as breaks)

    • -
    • A function that takes the breaks as input and returns labels -as output

    • -
    limits

    A numeric vector of length two providing limits of the scale. -Use NA to refer to the existing minimum or maximum.

    expand

    same as in ggplot2

    oob

    Function that handles limits outside of the scale limits -(out of bounds). The default replaces out of bounds values with NA.

    na.value

    If na.translate = TRUE, what value aesthetic + +

    guide
    +

    guide A function used to create a guide or its name. See guides() for more information.

    +
    n.breaks
    +

    An integer guiding the number of major breaks. The algorithm may choose a +slightly different number to ensure nice break labels. Will only have an effect if +breaks = waiver(). Use NULL to use the default number of breaks given by the transformation.

    +
    labels
    +

    Specifying overrides the default format (i.e. you really don't +want to do that). NULL means no labels.

    +
    limits
    +

    A numeric vector of length two providing limits of the scale. +Use NA to refer to the existing minimum or maximum.

    +
    expand
    +

    same as in ggplot2

    +
    oob
    +

    Function that handles limits outside of the scale limits +(out of bounds). The default replaces out of bounds values with NA.

    +
    na.value
    +

    If na.translate = TRUE, what value aesthetic value should missing be displayed as? Does not apply to position scales -where NA is always placed at the far right.

    trans

    Either the name of a transformation object, or the +where NA is always placed at the far right.

    +
    trans
    +

    Either the name of a transformation object, or the object itself. Built-in transformations include "asn", "atanh", "boxcox", "exp", "identity", "log", "log10", "log1p", "log2", -"logit", "probability", "probit", "reciprocal", "reverse" and "sqrt".

    position

    The position of the axis. "left" or "right" for vertical -scales, "top" or "bottom" for horizontal scales

    sec.axis

    specify a secondary axis

    - -

    Details

    - -

    The _percent ones set precent format for axis text and expand=c(0,0) (you need to set limits).

    - - -
    - +
    +

    Details

    +

    The _percent ones set percent format for axis text and expand=c(0,0) (you need to set limits).

    +
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/theme_ipsum.html b/docs/reference/theme_ipsum.html index edbf644..ce39bf4 100644 --- a/docs/reference/theme_ipsum.html +++ b/docs/reference/theme_ipsum.html @@ -1,58 +1,12 @@ - - - - - - - -A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typography — theme_ipsum • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typography — theme_ipsum • hrbrthemes - - - + + -
    -
    - -
    -
    +
    -

    Also has a "dark" / "modern" version for the new RStudio theme

    -
    -
    theme_ipsum(base_family = "Arial Narrow", base_size = 11.5,
    -  plot_title_family = base_family, plot_title_size = 18,
    -  plot_title_face = "bold", plot_title_margin = 10,
    -  subtitle_family = base_family, subtitle_size = 12,
    -  subtitle_face = "plain", subtitle_margin = 15,
    -  strip_text_family = base_family, strip_text_size = 12,
    -  strip_text_face = "plain", caption_family = base_family,
    -  caption_size = 9, caption_face = "italic", caption_margin = 10,
    -  axis_text_size = base_size, axis_title_family = subtitle_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)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    base_family, base_size

    base font family and size

    plot_title_family, plot_title_face, plot_title_size, plot_title_margin

    plot title family, face, size and margi

    subtitle_family, subtitle_face, subtitle_size

    plot subtitle family, face and size

    subtitle_margin

    plot subtitle margin bottom (single numeric value)

    strip_text_family, strip_text_face, strip_text_size

    facet label font family, face and size

    caption_family, caption_face, caption_size, caption_margin

    plot caption family, face, size and margin

    axis_text_size

    font size of axis text

    axis_title_family, axis_title_face, axis_title_size

    axis title font family, face and size

    axis_title_just

    axis title font justification, one of [blmcrt]

    plot_margin

    plot margin (specify with ggplot2::margin())

    grid_col, axis_col

    grid & axis colors; both default to #cccccc

    grid

    panel grid (TRUE, FALSE, or a combination of X, x, Y, y)

    axis

    add x or y axes? TRUE, FALSE, "xy"

    ticks

    ticks if TRUE add ticks

    - -

    Why Arial Narrow?

    +
    +
    theme_ipsum(
    +  base_family = "Arial Narrow",
    +  base_size = 11.5,
    +  plot_title_family = base_family,
    +  plot_title_size = 18,
    +  plot_title_face = "bold",
    +  plot_title_margin = 10,
    +  subtitle_family = base_family,
    +  subtitle_size = 12,
    +  subtitle_face = "plain",
    +  subtitle_margin = 15,
    +  strip_text_family = base_family,
    +  strip_text_size = 12,
    +  strip_text_face = "plain",
    +  caption_family = base_family,
    +  caption_size = 9,
    +  caption_face = "italic",
    +  caption_margin = 10,
    +  axis_text_size = base_size,
    +  axis_title_family = subtitle_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
    +)
    +
    +
    +

    Arguments

    +
    base_family, base_size
    +

    base font family and size

    +
    plot_title_family, plot_title_face, plot_title_size, plot_title_margin
    +

    plot title family, face, size and margi

    +
    subtitle_family, subtitle_face, subtitle_size
    +

    plot subtitle family, face and size

    +
    subtitle_margin
    +

    plot subtitle margin bottom (single numeric value)

    +
    strip_text_family, strip_text_face, strip_text_size
    +

    facet label font family, face and size

    +
    caption_family, caption_face, caption_size, caption_margin
    +

    plot caption family, face, size and margin

    +
    axis_text_size
    +

    font size of axis text

    +
    axis_title_family, axis_title_face, axis_title_size
    +

    axis title font family, face and size

    +
    axis_title_just
    +

    axis title font justification, one of [blmcrt]

    +
    plot_margin
    +

    plot margin (specify with ggplot2::margin())

    +
    grid_col, axis_col
    +

    grid & axis colors; both default to #cccccc

    +
    grid
    +

    panel grid (TRUE, FALSE, or a combination of X, x, Y, y)

    +
    axis
    +

    add x or y axes? TRUE, FALSE, "xy"

    +
    ticks
    +

    ticks if TRUE add ticks

    +
    +
    +

    Why Arial Narrow?

    -

    First and foremost, Arial Narrow is generally installed by default or readily + +

    First and foremost, Arial Narrow is generally installed by default or readily available on any modern system, so it's "free"-ish; plus, it is a condensed font with solid default kerning pairs and geometric numbers.

    +
    +
    +

    Building upon theme_ipsum

    -

    Building upon theme_ipsum

    - -

    The function is setup in such a way that you can customize your own one by just +

    The function is setup in such a way that you can customize your own one by just wrapping the call and changing the parameters. See source for examples.

    +
    +
    +

    Gotchas

    -

    Gotchas

    - -

    There are distinctions between font names and various devices. Names that work +

    There are distinctions between font names and various devices. Names that work for display graphics devices and bitmap ones such as png may not work well for PostScript or PDF ones. You may need two versions of a font-based theme function for them to work in a particular situation. This situation usually only arises when using a newer font with many weights but somewhat irregular internal font name patterns.

    There is an option hrbrthemes.loadfonts which -- if set to TRUE -- will -call extrafont::loadfonts() to register non-core fonts with R PDF & PostScript +call extrafont::loadfonts() to register non-core fonts with R PDF & PostScript devices. If you are running under Windows, the package calls the same function to register non-core fonts with the Windows graphics device.

    - - -

    Examples

    -
    # NOT RUN {
    -library(ggplot2)
    -library(dplyr)
    -
    -# seminal scatterplot
    -ggplot(mtcars, aes(mpg, wt)) +
    -  geom_point() +
    -  labs(x="Fuel effiiency (mpg)", y="Weight (tons)",
    -       title="Seminal ggplot2 scatterplot example",
    -       subtitle="A plot that is only useful for demonstration purposes",
    -       caption="Brought to you by the letter 'g'") +
    -  theme_ipsum()
    -
    -# seminal bar chart
    -
    -update_geom_font_defaults()
    -
    -count(mpg, class) %>%
    -  ggplot(aes(class, n)) +
    -  geom_col() +
    -  geom_text(aes(label=n), nudge_y=3) +
    -  labs(x="Fuel efficiency (mpg)", y="Weight (tons)",
    -       title="Seminal ggplot2 bar chart example",
    -       subtitle="A plot that is only useful for demonstration purposes",
    -       caption="Brought to you by the letter 'g'") +
    -  theme_ipsum(grid="Y") +
    -  theme(axis.text.y=element_blank())
    -# }
    -
    - +
    +

    Examples

    +
    if (FALSE) {
    +library(ggplot2)
    +library(dplyr)
    +
    +# seminal scatterplot
    +ggplot(mtcars, aes(mpg, wt)) +
    +  geom_point() +
    +  labs(x="Fuel efficiency (mpg)", y="Weight (tons)",
    +       title="Seminal ggplot2 scatterplot example",
    +       subtitle="A plot that is only useful for demonstration purposes",
    +       caption="Brought to you by the letter 'g'") +
    +  theme_ipsum()
    +
    +# seminal bar chart
    +
    +update_geom_font_defaults()
    +
    +count(mpg, class) %>%
    +  ggplot(aes(class, n)) +
    +  geom_col() +
    +  geom_text(aes(label=n), nudge_y=3) +
    +  labs(x="Fuel efficiency (mpg)", y="Weight (tons)",
    +       title="Seminal ggplot2 bar chart example",
    +       subtitle="A plot that is only useful for demonstration purposes",
    +       caption="Brought to you by the letter 'g'") +
    +  theme_ipsum(grid="Y") +
    +  theme(axis.text.y=element_blank())
    +}
    +
    +
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/theme_ipsum_es.html b/docs/reference/theme_ipsum_es.html new file mode 100644 index 0000000..10d7782 --- /dev/null +++ b/docs/reference/theme_ipsum_es.html @@ -0,0 +1,209 @@ + +A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typography — theme_ipsum_es • hrbrthemes + + +
    +
    + + + +
    +
    + + +
    +

    You should import_econ_sans() first and also install the fonts on your +system before trying to use this theme.

    +
    + +
    +
    theme_ipsum_es(
    +  base_family = "EconSansCndReg",
    +  base_size = 11.5,
    +  plot_title_family = "EconSansCndBol",
    +  plot_title_size = 18,
    +  plot_title_face = "bold",
    +  plot_title_margin = 10,
    +  subtitle_family = if (.Platform$OS.type == "windows") "EconSansCndLig" else
    +    "EconSansCndLig",
    +  subtitle_size = 13,
    +  subtitle_face = "plain",
    +  subtitle_margin = 15,
    +  strip_text_family = base_family,
    +  strip_text_size = 12,
    +  strip_text_face = "plain",
    +  caption_family = if (.Platform$OS.type == "windows") "EconSansCndLig" else
    +    "EconSansCndLig",
    +  caption_size = 9,
    +  caption_face = "plain",
    +  caption_margin = 10,
    +  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),
    +  panel_spacing = grid::unit(2, "lines"),
    +  grid_col = "#cccccc",
    +  grid = TRUE,
    +  axis_col = "#cccccc",
    +  axis = FALSE,
    +  ticks = FALSE
    +)
    +
    + +
    +

    Arguments

    +
    base_family, base_size
    +

    base font family and size

    +
    plot_title_family, plot_title_face, plot_title_size, plot_title_margin
    +

    plot title family, face, size and margin

    +
    subtitle_family, subtitle_face, subtitle_size
    +

    plot subtitle family, face and size

    +
    subtitle_margin
    +

    plot subtitle margin bottom (single numeric value)

    +
    strip_text_family, strip_text_face, strip_text_size
    +

    facet label font family, face and size

    +
    caption_family, caption_face, caption_size, caption_margin
    +

    plot caption family, face, size and margin

    +
    axis_text_size
    +

    font size of axis text

    +
    axis_title_family, axis_title_face, axis_title_size
    +

    axis title font family, face and size

    +
    axis_title_just
    +

    axis title font justification; one of [blmcrt]

    +
    plot_margin
    +

    plot margin (specify with ggplot2::margin)

    +
    panel_spacing
    +

    panel spacing (use unit())

    +
    grid_col
    +

    grid color

    +
    grid
    +

    panel grid (TRUE, FALSE, or a combination of X, x, Y, y)

    +
    axis_col
    +

    axis color

    +
    axis
    +

    add x or y axes? TRUE, FALSE, "xy"

    +
    ticks
    +

    ticks if TRUE add ticks

    +
    +
    +

    Details

    +

    There is an option hrbrthemes.loadfonts which -- if set to TRUE -- will +call extrafont::loadfonts() to register non-core fonts with R PDF & PostScript +devices. If you are running under Windows, the package calls the same function +to register non-core fonts with the Windows graphics device.

    +
    +
    +

    Why Econ Sans Condensed?

    + + +

    It's free, has tolerable kerning pairs and multiple weights. It's also different +than Arial Narrow and the fonts most folks use in ggplot2 charts.

    +
    + +
    +

    Examples

    +
    if (FALSE) {
    +library(ggplot2)
    +library(dplyr)
    +
    +# seminal scatterplot
    +ggplot(mtcars, aes(mpg, wt)) +
    +  geom_point() +
    +  labs(x="Fuel efficiency (mpg)", y="Weight (tons)",
    +       title="Seminal ggplot2 scatterplot example",
    +       subtitle="A plot that is only useful for demonstration purposes",
    +       caption="Brought to you by the letter 'g'") +
    +  theme_ipsum_es()
    +
    +# seminal bar chart
    +
    +# note: may need to make this font_es on Windows
    +update_geom_font_defaults(family=font_es_light)
    +
    +count(mpg, class) %>%
    +  ggplot(aes(class, n)) +
    +  geom_col() +
    +  geom_text(aes(label=n), nudge_y=3) +
    +  labs(x="Fuel efficiency (mpg)", y="Weight (tons)",
    +       title="Seminal ggplot2 bar chart example",
    +       subtitle="A plot that is only useful for demonstration purposes",
    +       caption="Brought to you by the letter 'g'") +
    +  theme_ipsum_es(grid="Y") +
    +  theme(axis.text.y=element_blank())
    +}
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.0.2.9000.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/theme_ipsum_gs.html b/docs/reference/theme_ipsum_gs.html new file mode 100644 index 0000000..4a9f689 --- /dev/null +++ b/docs/reference/theme_ipsum_gs.html @@ -0,0 +1,204 @@ + +A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typography — theme_ipsum_gs • hrbrthemes + + +
    +
    + + + +
    +
    + + +
    +

    You should import_goldman_sans() first and also install the fonts on your +system before trying to use this theme.

    +
    + +
    +
    theme_ipsum_gs(
    +  base_family = "Goldman Sans Condensed",
    +  base_size = 11.5,
    +  plot_title_family = "Goldman Sans Condensed",
    +  plot_title_size = 18,
    +  plot_title_face = "bold",
    +  plot_title_margin = 10,
    +  subtitle_family = if (.Platform$OS.type == "windows") "Goldman Sans Condensed" else
    +    "Goldman Sans Condensed",
    +  subtitle_size = 13,
    +  subtitle_face = "plain",
    +  subtitle_margin = 15,
    +  strip_text_family = "Goldman Sans Condensed",
    +  strip_text_size = 12,
    +  strip_text_face = "bold",
    +  caption_family = if (.Platform$OS.type == "windows") "Goldman Sans Condensed" else
    +    "Goldman Sans Condensed",
    +  caption_size = 9,
    +  caption_face = "plain",
    +  caption_margin = 10,
    +  axis_text_size = 9,
    +  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
    +)
    +
    + +
    +

    Arguments

    +
    base_family, base_size
    +

    base font family and size

    +
    plot_title_family, plot_title_face, plot_title_size, plot_title_margin
    +

    plot title family, face, size and margin

    +
    subtitle_family, subtitle_face, subtitle_size
    +

    plot subtitle family, face and size

    +
    subtitle_margin
    +

    plot subtitle margin bottom (single numeric value)

    +
    strip_text_family, strip_text_face, strip_text_size
    +

    facet label font family, face and size

    +
    caption_family, caption_face, caption_size, caption_margin
    +

    plot caption family, face, size and margin

    +
    axis_text_size
    +

    font size of axis text

    +
    axis_title_family, axis_title_face, axis_title_size
    +

    axis title font family, face and size

    +
    axis_title_just
    +

    axis title font justification; one of [blmcrt]

    +
    plot_margin
    +

    plot margin (specify with ggplot2::margin)

    +
    grid_col
    +

    grid color

    +
    grid
    +

    panel grid (TRUE, FALSE, or a combination of X, x, Y, y)

    +
    axis_col
    +

    axis color

    +
    axis
    +

    add x or y axes? TRUE, FALSE, "xy"

    +
    ticks
    +

    ticks if TRUE add ticks

    +
    +
    +

    Details

    +

    There is an option hrbrthemes.loadfonts which -- if set to TRUE -- will +call extrafont::loadfonts() to register non-core fonts with R PDF & PostScript +devices. If you are running under Windows, the package calls the same function +to register non-core fonts with the Windows graphics device.

    +
    +
    +

    Why Goldman Sans?

    + + +

    See https://design.gs.com/d/story/goldman-sans/.

    +
    + +
    +

    Examples

    +
    if (FALSE) {
    +library(ggplot2)
    +library(dplyr)
    +
    +# seminal scatterplot
    +ggplot(mtcars, aes(mpg, wt)) +
    +  geom_point() +
    +  labs(x="Fuel efficiency (mpg)", y="Weight (tons)",
    +       title="Seminal ggplot2 scatterplot example",
    +       subtitle="A plot that is only useful for demonstration purposes",
    +       caption="Brought to you by the letter 'g'") +
    +  theme_ipsum_gs()
    +
    +# seminal bar chart
    +
    +update_geom_font_defaults(family=font_gs_light)
    +
    +count(mpg, class) %>%
    +  ggplot(aes(class, n)) +
    +  geom_col() +
    +  geom_text(aes(label=n), nudge_y=3) +
    +  labs(x="Fuel efficiency (mpg)", y="Weight (tons)",
    +       title="Seminal ggplot2 bar chart example",
    +       subtitle="A plot that is only useful for demonstration purposes",
    +       caption="Brought to you by the letter 'g'") +
    +  theme_ipsum_gs(grid="Y") +
    +  theme(axis.text.y=element_blank())
    +}
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.0.2.9000.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/theme_ipsum_inter.html b/docs/reference/theme_ipsum_inter.html new file mode 100644 index 0000000..d062e66 --- /dev/null +++ b/docs/reference/theme_ipsum_inter.html @@ -0,0 +1,204 @@ + +A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typography — theme_ipsum_inter • hrbrthemes + + +
    +
    + + + +
    +
    + + +
    +

    You should import_inter() first and also install the fonts on your +system before trying to use this theme.

    +
    + +
    +
    theme_ipsum_inter(
    +  base_family = "Inter-Medium",
    +  base_size = 10,
    +  plot_title_family = "Inter-Bold",
    +  plot_title_size = 16,
    +  plot_title_face = "bold",
    +  plot_title_margin = 8,
    +  subtitle_family = "Inter-Light",
    +  subtitle_size = 12,
    +  subtitle_face = "plain",
    +  subtitle_margin = 13,
    +  strip_text_family = "Inter-SemiBold",
    +  strip_text_size = 12,
    +  strip_text_face = "bold",
    +  caption_family = "Inter-Thin",
    +  caption_size = 9,
    +  caption_face = "plain",
    +  caption_margin = 10,
    +  axis_text_family = "Inter-Light",
    +  axis_text_face = "plain",
    +  axis_text_size = 9,
    +  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
    +)
    +
    + +
    +

    Arguments

    +
    base_family, base_size
    +

    base font family and size

    +
    plot_title_family, plot_title_face, plot_title_size, plot_title_margin
    +

    plot title family, face, size and margin

    +
    subtitle_family, subtitle_face, subtitle_size
    +

    plot subtitle family, face and size

    +
    subtitle_margin
    +

    plot subtitle margin bottom (single numeric value)

    +
    strip_text_family, strip_text_face, strip_text_size
    +

    facet label font family, face and size

    +
    caption_family, caption_face, caption_size, caption_margin
    +

    plot caption family, face, size and margin

    +
    axis_text_family, axis_text_face, axis_text_size
    +

    axis text font family, face, and size

    +
    axis_title_family, axis_title_face, axis_title_size
    +

    axis title font family, face and size

    +
    axis_title_just
    +

    axis title font justification; one of [blmcrt]

    +
    plot_margin
    +

    plot margin (specify with ggplot2::margin)

    +
    grid_col
    +

    grid color

    +
    grid
    +

    panel grid (TRUE, FALSE, or a combination of X, x, Y, y)

    +
    axis_col
    +

    axis color

    +
    axis
    +

    add x or y axes? TRUE, FALSE, "xy"

    +
    ticks
    +

    ticks if TRUE add ticks

    +
    +
    +

    Details

    +

    There is an option hrbrthemes.loadfonts which -- if set to TRUE -- will +call extrafont::loadfonts() to register non-core fonts with R PDF & PostScript +devices. If you are running under Windows, the package calls the same function +to register non-core fonts with the Windows graphics device.

    +
    + + +
    +

    Examples

    +
    if (FALSE) {
    +library(ggplot2)
    +library(dplyr)
    +
    +# seminal scatterplot
    +ggplot(mtcars, aes(mpg, wt)) +
    +  geom_point() +
    +  labs(x="Fuel efficiency (mpg)", y="Weight (tons)",
    +       title="Seminal ggplot2 scatterplot example",
    +       subtitle="A plot that is only useful for demonstration purposes",
    +       caption="Brought to you by the letter 'g'") +
    +  theme_ipsum_inter()
    +
    +# seminal bar chart
    +
    +update_geom_font_defaults(family=font_inter_medium)
    +
    +count(mpg, class) %>%
    +  ggplot(aes(class, n)) +
    +  geom_col() +
    +  geom_text(aes(label=n), nudge_y=3) +
    +  labs(x="Fuel efficiency (mpg)", y="Weight (tons)",
    +       title="Seminal ggplot2 bar chart example",
    +       subtitle="A plot that is only useful for demonstration purposes",
    +       caption="Brought to you by the letter 'g'") +
    +  theme_ipsum_inter(grid="Y") +
    +  theme(axis.text.y=element_blank())
    +}
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.0.2.9000.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/theme_ipsum_ps.html b/docs/reference/theme_ipsum_ps.html index 653ea3c..621bd5d 100644 --- a/docs/reference/theme_ipsum_ps.html +++ b/docs/reference/theme_ipsum_ps.html @@ -1,59 +1,13 @@ - - - - - - - -A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typoghraphy — theme_ipsum_ps • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typography — theme_ipsum_ps • hrbrthemes - - - + + -
    -
    - -
    -
    +
    - -

    You should import_plex_sans first and also install the fonts on your +

    You should import_plex_sans() first and also install the fonts on your system before trying to use this theme.

    -
    -
    theme_ipsum_ps(base_family = "IBMPlexSans", base_size = 11.5,
    -  plot_title_family = "IBMPlexSans-Bold", plot_title_size = 18,
    -  plot_title_face = "plain", plot_title_margin = 10,
    -  subtitle_family = if (.Platform$OS.type == "windows") "IBMPlexSans"
    -  else "IBMPlexSans-Light", subtitle_size = 13,
    -  subtitle_face = "plain", subtitle_margin = 15,
    -  strip_text_family = "IBMPlexSans-Medium", strip_text_size = 12,
    -  strip_text_face = "plain", caption_family = if (.Platform$OS.type ==
    -  "windows") "IBMPlexSans" else "IBMPlexSans-Thin", caption_size = 9,
    -  caption_face = "plain", caption_margin = 10, axis_text_size = 9,
    -  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)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    base_family, base_size

    base font family and size

    plot_title_family, plot_title_face, plot_title_size, plot_title_margin

    plot tilte family, face, size and margin

    subtitle_family, subtitle_face, subtitle_size

    plot subtitle family, face and size

    subtitle_margin

    plot subtitle margin bottom (single numeric value)

    strip_text_family, strip_text_face, strip_text_size

    facet label font family, face and size

    caption_family, caption_face, caption_size, caption_margin

    plot caption family, face, size and margin

    axis_text_size

    font size of axis text

    axis_title_family, axis_title_face, axis_title_size

    axis title font family, face and size

    axis_title_just

    axis title font justificationk one of [blmcrt]

    plot_margin

    plot margin (specify with ggplot2::margin)

    grid_col

    grid color

    grid

    panel grid (TRUE, FALSE, or a combination of X, x, Y, y)

    axis_col

    axis color

    axis

    add x or y axes? TRUE, FALSE, "xy"

    ticks

    ticks if TRUE add ticks

    - -

    Details

    +
    +
    theme_ipsum_ps(
    +  base_family = "IBMPlexSans",
    +  base_size = 11.5,
    +  plot_title_family = "IBMPlexSans-Bold",
    +  plot_title_size = 18,
    +  plot_title_face = "plain",
    +  plot_title_margin = 10,
    +  subtitle_family = if (.Platform$OS.type == "windows") "IBMPlexSans" else
    +    "IBMPlexSans-Light",
    +  subtitle_size = 13,
    +  subtitle_face = "plain",
    +  subtitle_margin = 15,
    +  strip_text_family = "IBMPlexSans-Medium",
    +  strip_text_size = 12,
    +  strip_text_face = "plain",
    +  caption_family = if (.Platform$OS.type == "windows") "IBMPlexSans" else
    +    "IBMPlexSans-Thin",
    +  caption_size = 9,
    +  caption_face = "plain",
    +  caption_margin = 10,
    +  axis_text_size = 9,
    +  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
    +)
    +
    +
    +

    Arguments

    +
    base_family, base_size
    +

    base font family and size

    +
    plot_title_family, plot_title_face, plot_title_size, plot_title_margin
    +

    plot title family, face, size and margin

    +
    subtitle_family, subtitle_face, subtitle_size
    +

    plot subtitle family, face and size

    +
    subtitle_margin
    +

    plot subtitle margin bottom (single numeric value)

    +
    strip_text_family, strip_text_face, strip_text_size
    +

    facet label font family, face and size

    +
    caption_family, caption_face, caption_size, caption_margin
    +

    plot caption family, face, size and margin

    +
    axis_text_size
    +

    font size of axis text

    +
    axis_title_family, axis_title_face, axis_title_size
    +

    axis title font family, face and size

    +
    axis_title_just
    +

    axis title font justification; one of [blmcrt]

    +
    plot_margin
    +

    plot margin (specify with ggplot2::margin)

    +
    grid_col
    +

    grid color

    +
    grid
    +

    panel grid (TRUE, FALSE, or a combination of X, x, Y, y)

    +
    axis_col
    +

    axis color

    +
    axis
    +

    add x or y axes? TRUE, FALSE, "xy"

    +
    ticks
    +

    ticks if TRUE add ticks

    +
    +
    +

    Details

    There is an option hrbrthemes.loadfonts which -- if set to TRUE -- will -call extrafont::loadfonts() to register non-core fonts with R PDF & PostScript +call extrafont::loadfonts() to register non-core fonts with R PDF & PostScript devices. If you are running under Windows, the package calls the same function to register non-core fonts with the Windows graphics device.

    +
    +
    +

    Why IBM Plex Sans?

    -

    Why IBM Plex Sans?

    - -

    It's free, has tolerable kerning pairs and multiple weights. It's also different +

    It's free, has tolerable kerning pairs and multiple weights. It's also different "not Helvetica".

    - - -

    Examples

    -
    # NOT RUN {
    -library(ggplot2)
    -library(dplyr)
    -
    -# seminal scatterplot
    -ggplot(mtcars, aes(mpg, wt)) +
    -  geom_point() +
    -  labs(x="Fuel effiiency (mpg)", y="Weight (tons)",
    -       title="Seminal ggplot2 scatterplot example",
    -       subtitle="A plot that is only useful for demonstration purposes",
    -       caption="Brought to you by the letter 'g'") +
    -  theme_ipsum_rc()
    -
    -# seminal bar chart
    -
    -# note: make this font_rc on Windows
    -update_geom_font_defaults(family=font_rc_light)
    -
    -count(mpg, class) %>%
    -  ggplot(aes(class, n)) +
    -  geom_col() +
    -  geom_text(aes(label=n), nudge_y=3) +
    -  labs(x="Fuel effiiency (mpg)", y="Weight (tons)",
    -       title="Seminal ggplot2 bar chart example",
    -       subtitle="A plot that is only useful for demonstration purposes",
    -       caption="Brought to you by the letter 'g'") +
    -  theme_ipsum_rc(grid="Y") +
    -  theme(axis.text.y=element_blank())
    -# }
    -
    - +
    +

    Examples

    +
    if (FALSE) {
    +library(ggplot2)
    +library(dplyr)
    +
    +# seminal scatterplot
    +ggplot(mtcars, aes(mpg, wt)) +
    +  geom_point() +
    +  labs(x="Fuel efficiency (mpg)", y="Weight (tons)",
    +       title="Seminal ggplot2 scatterplot example",
    +       subtitle="A plot that is only useful for demonstration purposes",
    +       caption="Brought to you by the letter 'g'") +
    +  theme_ipsum_rc()
    +
    +# seminal bar chart
    +
    +# note: make this font_rc on Windows
    +update_geom_font_defaults(family=font_rc_light)
    +
    +count(mpg, class) %>%
    +  ggplot(aes(class, n)) +
    +  geom_col() +
    +  geom_text(aes(label=n), nudge_y=3) +
    +  labs(x="Fuel efficiency (mpg)", y="Weight (tons)",
    +       title="Seminal ggplot2 bar chart example",
    +       subtitle="A plot that is only useful for demonstration purposes",
    +       caption="Brought to you by the letter 'g'") +
    +  theme_ipsum_rc(grid="Y") +
    +  theme(axis.text.y=element_blank())
    +}
    +
    +
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/theme_ipsum_pub.html b/docs/reference/theme_ipsum_pub.html new file mode 100644 index 0000000..d4db409 --- /dev/null +++ b/docs/reference/theme_ipsum_pub.html @@ -0,0 +1,206 @@ + +A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typography — theme_ipsum_pub • hrbrthemes + + +
    +
    + + + +
    +
    + + +
    +

    You should import_public_sans() first and also install the fonts on your +system before trying to use this theme.

    +
    + +
    +
    theme_ipsum_pub(
    +  base_family = "Public Sans",
    +  base_size = 10.5,
    +  plot_title_family = if (.Platform$OS.type == "windows") "Public Sans" else
    +    "Public Sans Bold",
    +  plot_title_size = 18,
    +  plot_title_face = "bold",
    +  plot_title_margin = 10,
    +  subtitle_family = if (.Platform$OS.type == "windows") "Public Sans Thin" else
    +    "Public Sans Thin",
    +  subtitle_size = 13,
    +  subtitle_face = "plain",
    +  subtitle_margin = 15,
    +  strip_text_family = base_family,
    +  strip_text_size = 12,
    +  strip_text_face = "plain",
    +  caption_family = if (.Platform$OS.type == "windows") "Public Sans Thin" else
    +    "Public Sans Thin",
    +  caption_size = 9,
    +  caption_face = "plain",
    +  caption_margin = 10,
    +  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
    +)
    +
    + +
    +

    Arguments

    +
    base_family, base_size
    +

    base font family and size

    +
    plot_title_family, plot_title_face, plot_title_size, plot_title_margin
    +

    plot title family, face, size and margin

    +
    subtitle_family, subtitle_face, subtitle_size
    +

    plot subtitle family, face and size

    +
    subtitle_margin
    +

    plot subtitle margin bottom (single numeric value)

    +
    strip_text_family, strip_text_face, strip_text_size
    +

    facet label font family, face and size

    +
    caption_family, caption_face, caption_size, caption_margin
    +

    plot caption family, face, size and margin

    +
    axis_text_size
    +

    font size of axis text

    +
    axis_title_family, axis_title_face, axis_title_size
    +

    axis title font family, face and size

    +
    axis_title_just
    +

    axis title font justification; one of [blmcrt]

    +
    plot_margin
    +

    plot margin (specify with ggplot2::margin)

    +
    grid_col
    +

    grid color

    +
    grid
    +

    panel grid (TRUE, FALSE, or a combination of X, x, Y, y)

    +
    axis_col
    +

    axis color

    +
    axis
    +

    add x or y axes? TRUE, FALSE, "xy"

    +
    ticks
    +

    ticks if TRUE add ticks

    +
    +
    +

    Details

    +

    There is an option hrbrthemes.loadfonts which -- if set to TRUE -- will +call extrafont::loadfonts() to register non-core fonts with R PDF & PostScript +devices. If you are running under Windows, the package calls the same function +to register non-core fonts with the Windows graphics device.

    +
    +
    +

    Why Public Sans?

    + + + +

    See the design principles.

    +
    + +
    +

    Examples

    +
    if (FALSE) {
    +library(ggplot2)
    +library(dplyr)
    +
    +# seminal scatterplot
    +ggplot(mtcars, aes(mpg, wt)) +
    +  geom_point() +
    +  labs(x="Fuel efficiency (mpg)", y="Weight (tons)",
    +       title="Seminal ggplot2 scatterplot example",
    +       subtitle="A plot that is only useful for demonstration purposes",
    +       caption="Brought to you by the letter 'g'") +
    +  theme_ipsum_pub()
    +
    +# seminal bar chart
    +
    +update_geom_font_defaults(family=font_pub)
    +
    +count(mpg, class) %>%
    +  ggplot(aes(class, n)) +
    +  geom_col() +
    +  geom_text(aes(label=n), nudge_y=3) +
    +  labs(x="Fuel efficiency (mpg)", y="Weight (tons)",
    +       title="Seminal ggplot2 bar chart example",
    +       subtitle="A plot that is only useful for demonstration purposes",
    +       caption="Brought to you by the letter 'g'") +
    +  theme_ipsum_pub(grid="Y") +
    +  theme(axis.text.y=element_blank())
    +}
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.0.2.9000.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/theme_ipsum_rc.html b/docs/reference/theme_ipsum_rc.html index c457a9a..8c74ad8 100644 --- a/docs/reference/theme_ipsum_rc.html +++ b/docs/reference/theme_ipsum_rc.html @@ -1,59 +1,13 @@ - - - - - - - -A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typoghraphy — theme_ft_rc • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typography — theme_ft_rc • hrbrthemes - - - + + -
    -
    - -
    -
    +
    - -

    You should import_roboto_condensed first and also install the fonts on your +

    You should import_roboto_condensed() first and also install the fonts on your system before trying to use this theme.

    -
    -
    theme_ft_rc(base_family = "Roboto Condensed", base_size = 11.5,
    -  plot_title_family = base_family, plot_title_size = 18,
    -  plot_title_face = "bold", plot_title_margin = 10,
    -  subtitle_family = if (.Platform$OS.type == "windows")
    -  "Roboto Condensed" else "Roboto Condensed Light", subtitle_size = 13,
    -  subtitle_face = "plain", subtitle_margin = 15,
    -  strip_text_family = base_family, strip_text_size = 12,
    -  strip_text_face = "plain", caption_family = if (.Platform$OS.type ==
    -  "windows") "Roboto Condensed" else "Roboto Condensed Light",
    -  caption_size = 9, caption_face = "plain", caption_margin = 10,
    -  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 = TRUE, axis = FALSE, ticks = FALSE)
    -
    -theme_modern_rc(base_family = "Roboto Condensed", base_size = 11.5,
    -  plot_title_family = base_family, plot_title_size = 18,
    -  plot_title_face = "bold", plot_title_margin = 10,
    -  subtitle_family = if (.Platform$OS.type == "windows")
    -  "Roboto Condensed" else "Roboto Condensed Light", subtitle_size = 13,
    -  subtitle_face = "plain", subtitle_margin = 15,
    -  strip_text_family = base_family, strip_text_size = 12,
    -  strip_text_face = "plain", caption_family = if (.Platform$OS.type ==
    -  "windows") "Roboto Condensed" else "Roboto Condensed Light",
    -  caption_size = 9, caption_face = "plain", caption_margin = 10,
    -  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 = TRUE, axis = FALSE, ticks = FALSE)
    -
    -theme_ipsum_rc(base_family = "Roboto Condensed", base_size = 11.5,
    -  plot_title_family = base_family, plot_title_size = 18,
    -  plot_title_face = "bold", plot_title_margin = 10,
    -  subtitle_family = if (.Platform$OS.type == "windows")
    -  "Roboto Condensed" else "Roboto Condensed Light", subtitle_size = 13,
    -  subtitle_face = "plain", subtitle_margin = 15,
    -  strip_text_family = base_family, strip_text_size = 12,
    -  strip_text_face = "plain", caption_family = if (.Platform$OS.type ==
    -  "windows") "Roboto Condensed" else "Roboto Condensed Light",
    -  caption_size = 9, caption_face = "plain", caption_margin = 10,
    -  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)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    base_family, base_size

    base font family and size

    plot_title_family, plot_title_face, plot_title_size, plot_title_margin

    plot tilte family, face, size and margin

    subtitle_family, subtitle_face, subtitle_size

    plot subtitle family, face and size

    subtitle_margin

    plot subtitle margin bottom (single numeric value)

    strip_text_family, strip_text_face, strip_text_size

    facet label font family, face and size

    caption_family, caption_face, caption_size, caption_margin

    plot caption family, face, size and margin

    axis_text_size

    font size of axis text

    axis_title_family, axis_title_face, axis_title_size

    axis title font family, face and size

    axis_title_just

    axis title font justificationk one of [blmcrt]

    plot_margin

    plot margin (specify with ggplot2::margin)

    grid

    panel grid (TRUE, FALSE, or a combination of X, x, Y, y)

    axis

    add x or y axes? TRUE, FALSE, "xy"

    ticks

    ticks if TRUE add ticks

    grid_col

    grid color

    axis_col

    axis color

    - -

    Details

    +
    +
    theme_ft_rc(
    +  base_family = "Roboto Condensed",
    +  base_size = 11.5,
    +  plot_title_family = base_family,
    +  plot_title_size = 18,
    +  plot_title_face = "bold",
    +  plot_title_margin = 10,
    +  subtitle_family = if (.Platform$OS.type == "windows") "Roboto Condensed" else
    +    "Roboto Condensed Light",
    +  subtitle_size = 13,
    +  subtitle_face = "plain",
    +  subtitle_margin = 15,
    +  strip_text_family = base_family,
    +  strip_text_size = 12,
    +  strip_text_face = "plain",
    +  caption_family = if (.Platform$OS.type == "windows") "Roboto Condensed" else
    +    "Roboto Condensed Light",
    +  caption_size = 9,
    +  caption_face = "plain",
    +  caption_margin = 10,
    +  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 = TRUE,
    +  axis = FALSE,
    +  ticks = FALSE
    +)
    +
    +theme_modern_rc(
    +  base_family = "Roboto Condensed",
    +  base_size = 11.5,
    +  plot_title_family = base_family,
    +  plot_title_size = 18,
    +  plot_title_face = "bold",
    +  plot_title_margin = 10,
    +  subtitle_family = if (.Platform$OS.type == "windows") "Roboto Condensed" else
    +    "Roboto Condensed Light",
    +  subtitle_size = 13,
    +  subtitle_face = "plain",
    +  subtitle_margin = 15,
    +  strip_text_family = base_family,
    +  strip_text_size = 12,
    +  strip_text_face = "plain",
    +  caption_family = if (.Platform$OS.type == "windows") "Roboto Condensed" else
    +    "Roboto Condensed Light",
    +  caption_size = 9,
    +  caption_face = "plain",
    +  caption_margin = 10,
    +  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 = TRUE,
    +  axis = FALSE,
    +  ticks = FALSE
    +)
    +
    +theme_ipsum_rc(
    +  base_family = "Roboto Condensed",
    +  base_size = 11.5,
    +  plot_title_family = base_family,
    +  plot_title_size = 18,
    +  plot_title_face = "bold",
    +  plot_title_margin = 10,
    +  subtitle_family = if (.Platform$OS.type == "windows") "Roboto Condensed" else
    +    "Roboto Condensed Light",
    +  subtitle_size = 13,
    +  subtitle_face = "plain",
    +  subtitle_margin = 15,
    +  strip_text_family = base_family,
    +  strip_text_size = 12,
    +  strip_text_face = "plain",
    +  caption_family = if (.Platform$OS.type == "windows") "Roboto Condensed" else
    +    "Roboto Condensed Light",
    +  caption_size = 9,
    +  caption_face = "plain",
    +  caption_margin = 10,
    +  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),
    +  panel_spacing = grid::unit(2, "lines"),
    +  grid_col = "#cccccc",
    +  grid = TRUE,
    +  axis_col = "#cccccc",
    +  axis = FALSE,
    +  ticks = FALSE
    +)
    +
    +
    +

    Arguments

    +
    base_family, base_size
    +

    base font family and size

    +
    plot_title_family, plot_title_face, plot_title_size, plot_title_margin
    +

    plot title family, face, size and margin

    +
    subtitle_family, subtitle_face, subtitle_size
    +

    plot subtitle family, face and size

    +
    subtitle_margin
    +

    plot subtitle margin bottom (single numeric value)

    +
    strip_text_family, strip_text_face, strip_text_size
    +

    facet label font family, face and size

    +
    caption_family, caption_face, caption_size, caption_margin
    +

    plot caption family, face, size and margin

    +
    axis_text_size
    +

    font size of axis text

    +
    axis_title_family, axis_title_face, axis_title_size
    +

    axis title font family, face and size

    +
    axis_title_just
    +

    axis title font justification; one of [blmcrt]

    +
    plot_margin
    +

    plot margin (specify with ggplot2::margin)

    +
    grid
    +

    panel grid (TRUE, FALSE, or a combination of X, x, Y, y)

    +
    axis
    +

    add x or y axes? TRUE, FALSE, "xy"

    +
    ticks
    +

    ticks if TRUE add ticks

    +
    panel_spacing
    +

    panel spacing (use unit())

    +
    grid_col
    +

    grid color

    +
    axis_col
    +

    axis color

    +
    +
    +

    Details

    There is an option hrbrthemes.loadfonts which -- if set to TRUE -- will -call extrafont::loadfonts() to register non-core fonts with R PDF & PostScript +call extrafont::loadfonts() to register non-core fonts with R PDF & PostScript devices. If you are running under Windows, the package calls the same function to register non-core fonts with the Windows graphics device.

    +
    +
    +

    Why Roboto Condensed?

    -

    Why Roboto Condensed?

    - -

    It's free, has tolerable kerning pairs and multiple weights. It's also different +

    It's free, has tolerable kerning pairs and multiple weights. It's also different than Arial Narrow and the fonts most folks use in ggplot2 charts.

    - - -

    Examples

    -
    # NOT RUN {
    -library(ggplot2)
    -library(dplyr)
    -
    -# seminal scatterplot
    -ggplot(mtcars, aes(mpg, wt)) +
    -  geom_point() +
    -  labs(x="Fuel effiiency (mpg)", y="Weight (tons)",
    -       title="Seminal ggplot2 scatterplot example",
    -       subtitle="A plot that is only useful for demonstration purposes",
    -       caption="Brought to you by the letter 'g'") +
    -  theme_ipsum_rc()
    -
    -# seminal bar chart
    -
    -# note: make this font_rc on Windows
    -update_geom_font_defaults(family=font_rc_light)
    -
    -count(mpg, class) %>%
    -  ggplot(aes(class, n)) +
    -  geom_col() +
    -  geom_text(aes(label=n), nudge_y=3) +
    -  labs(x="Fuel effiiency (mpg)", y="Weight (tons)",
    -       title="Seminal ggplot2 bar chart example",
    -       subtitle="A plot that is only useful for demonstration purposes",
    -       caption="Brought to you by the letter 'g'") +
    -  theme_ipsum_rc(grid="Y") +
    -  theme(axis.text.y=element_blank())
    -# }
    -
    - +
    +

    Examples

    +
    if (FALSE) {
    +library(ggplot2)
    +library(dplyr)
    +
    +# seminal scatterplot
    +ggplot(mtcars, aes(mpg, wt)) +
    +  geom_point() +
    +  labs(x="Fuel efficiency (mpg)", y="Weight (tons)",
    +       title="Seminal ggplot2 scatterplot example",
    +       subtitle="A plot that is only useful for demonstration purposes",
    +       caption="Brought to you by the letter 'g'") +
    +  theme_ipsum_rc()
    +
    +# seminal bar chart
    +
    +# note: make this font_rc on Windows
    +update_geom_font_defaults(family=font_rc_light)
    +
    +count(mpg, class) %>%
    +  ggplot(aes(class, n)) +
    +  geom_col() +
    +  geom_text(aes(label=n), nudge_y=3) +
    +  labs(x="Fuel efficiency (mpg)", y="Weight (tons)",
    +       title="Seminal ggplot2 bar chart example",
    +       subtitle="A plot that is only useful for demonstration purposes",
    +       caption="Brought to you by the letter 'g'") +
    +  theme_ipsum_rc(grid="Y") +
    +  theme(axis.text.y=element_blank())
    +}
    +
    +
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/theme_ipsum_tw.html b/docs/reference/theme_ipsum_tw.html index 74dfd22..fd58c46 100644 --- a/docs/reference/theme_ipsum_tw.html +++ b/docs/reference/theme_ipsum_tw.html @@ -1,59 +1,13 @@ - - - - - - - -A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typoghraphy — theme_ipsum_tw • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -A precise & pristine ggplot2 theme with opinionated defaults and an emphasis on typography — theme_ipsum_tw • hrbrthemes - - - + + -
    -
    - -
    -
    +
    - -

    You should import_titillium_web first and also install the fonts on your +

    You should import_titillium_web() first and also install the fonts on your system before trying to use this theme.

    -
    -
    theme_ipsum_tw(base_family = "Titillium Web", base_size = 10.5,
    -  plot_title_family = if (.Platform$OS.type == "windows") "Titillium Web"
    -  else "Titillium Web Bold", plot_title_size = 18,
    -  plot_title_face = "bold", plot_title_margin = 10,
    -  subtitle_family = if (.Platform$OS.type == "windows") "Titillium Web"
    -  else "Titillium Web Light", subtitle_size = 13,
    -  subtitle_face = "plain", subtitle_margin = 15,
    -  strip_text_family = base_family, strip_text_size = 12,
    -  strip_text_face = "plain", caption_family = if (.Platform$OS.type ==
    -  "windows") "Titillium Web" else "Titillium Web Light",
    -  caption_size = 9, caption_face = "plain", caption_margin = 10,
    -  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)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    base_family, base_size

    base font family and size

    plot_title_family, plot_title_face, plot_title_size, plot_title_margin

    plot tilte family, face, size and margin

    subtitle_family, subtitle_face, subtitle_size

    plot subtitle family, face and size

    subtitle_margin

    plot subtitle margin bottom (single numeric value)

    strip_text_family, strip_text_face, strip_text_size

    facet label font family, face and size

    caption_family, caption_face, caption_size, caption_margin

    plot caption family, face, size and margin

    axis_text_size

    font size of axis text

    axis_title_family, axis_title_face, axis_title_size

    axis title font family, face and size

    axis_title_just

    axis title font justificationk one of [blmcrt]

    plot_margin

    plot margin (specify with ggplot2::margin)

    grid_col

    grid color

    grid

    panel grid (TRUE, FALSE, or a combination of X, x, Y, y)

    axis_col

    axis color

    axis

    add x or y axes? TRUE, FALSE, "xy"

    ticks

    ticks if TRUE add ticks

    - -

    Details

    +
    +
    theme_ipsum_tw(
    +  base_family = "Titillium Web",
    +  base_size = 10.5,
    +  plot_title_family = if (.Platform$OS.type == "windows") "Titillium Web" else
    +    "Titillium Web Bold",
    +  plot_title_size = 18,
    +  plot_title_face = "bold",
    +  plot_title_margin = 10,
    +  subtitle_family = if (.Platform$OS.type == "windows") "Titillium Web" else
    +    "Titillium Web Light",
    +  subtitle_size = 13,
    +  subtitle_face = "plain",
    +  subtitle_margin = 15,
    +  strip_text_family = base_family,
    +  strip_text_size = 12,
    +  strip_text_face = "plain",
    +  caption_family = if (.Platform$OS.type == "windows") "Titillium Web" else
    +    "Titillium Web Light",
    +  caption_size = 9,
    +  caption_face = "plain",
    +  caption_margin = 10,
    +  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
    +)
    +
    +
    +

    Arguments

    +
    base_family, base_size
    +

    base font family and size

    +
    plot_title_family, plot_title_face, plot_title_size, plot_title_margin
    +

    plot title family, face, size and margin

    +
    subtitle_family, subtitle_face, subtitle_size
    +

    plot subtitle family, face and size

    +
    subtitle_margin
    +

    plot subtitle margin bottom (single numeric value)

    +
    strip_text_family, strip_text_face, strip_text_size
    +

    facet label font family, face and size

    +
    caption_family, caption_face, caption_size, caption_margin
    +

    plot caption family, face, size and margin

    +
    axis_text_size
    +

    font size of axis text

    +
    axis_title_family, axis_title_face, axis_title_size
    +

    axis title font family, face and size

    +
    axis_title_just
    +

    axis title font justification; one of [blmcrt]

    +
    plot_margin
    +

    plot margin (specify with ggplot2::margin)

    +
    grid_col
    +

    grid color

    +
    grid
    +

    panel grid (TRUE, FALSE, or a combination of X, x, Y, y)

    +
    axis_col
    +

    axis color

    +
    axis
    +

    add x or y axes? TRUE, FALSE, "xy"

    +
    ticks
    +

    ticks if TRUE add ticks

    +
    +
    +

    Details

    There is an option hrbrthemes.loadfonts which -- if set to TRUE -- will -call extrafont::loadfonts() to register non-core fonts with R PDF & PostScript +call extrafont::loadfonts() to register non-core fonts with R PDF & PostScript devices. If you are running under Windows, the package calls the same function to register non-core fonts with the Windows graphics device.

    +
    +
    +

    Why Titillium Web?

    -

    Why Titillium Web?

    - -

    It's free, has tolerable kerning pairs and multiple weights. It's also different +

    It's free, has tolerable kerning pairs and multiple weights. It's also different than Arial Narrow and the fonts most folks use in ggplot2 charts.

    - - -

    Examples

    -
    # NOT RUN {
    -library(ggplot2)
    -library(dplyr)
    -
    -# seminal scatterplot
    -ggplot(mtcars, aes(mpg, wt)) +
    -  geom_point() +
    -  labs(x="Fuel effiiency (mpg)", y="Weight (tons)",
    -       title="Seminal ggplot2 scatterplot example",
    -       subtitle="A plot that is only useful for demonstration purposes",
    -       caption="Brought to you by the letter 'g'") +
    -  theme_ipsum_rc()
    -
    -# seminal bar chart
    -
    -# note: make this font_rc on Windows
    -update_geom_font_defaults(family=font_rc_light)
    -
    -count(mpg, class) %>%
    -  ggplot(aes(class, n)) +
    -  geom_col() +
    -  geom_text(aes(label=n), nudge_y=3) +
    -  labs(x="Fuel effiiency (mpg)", y="Weight (tons)",
    -       title="Seminal ggplot2 bar chart example",
    -       subtitle="A plot that is only useful for demonstration purposes",
    -       caption="Brought to you by the letter 'g'") +
    -  theme_ipsum_tw(grid="Y") +
    -  theme(axis.text.y=element_blank())
    -# }
    -
    - +
    +

    Examples

    +
    if (FALSE) {
    +library(ggplot2)
    +library(dplyr)
    +
    +# seminal scatterplot
    +ggplot(mtcars, aes(mpg, wt)) +
    +  geom_point() +
    +  labs(x="Fuel efficiency (mpg)", y="Weight (tons)",
    +       title="Seminal ggplot2 scatterplot example",
    +       subtitle="A plot that is only useful for demonstration purposes",
    +       caption="Brought to you by the letter 'g'") +
    +  theme_ipsum_rc()
    +
    +# seminal bar chart
    +
    +# note: make this font_rc on Windows
    +update_geom_font_defaults(family=font_rc_light)
    +
    +count(mpg, class) %>%
    +  ggplot(aes(class, n)) +
    +  geom_col() +
    +  geom_text(aes(label=n), nudge_y=3) +
    +  labs(x="Fuel efficiency (mpg)", y="Weight (tons)",
    +       title="Seminal ggplot2 bar chart example",
    +       subtitle="A plot that is only useful for demonstration purposes",
    +       caption="Brought to you by the letter 'g'") +
    +  theme_ipsum_tw(grid="Y") +
    +  theme(axis.text.y=element_blank())
    +}
    +
    +
    +
    -
    - + +
    + + + - - + diff --git a/docs/reference/theme_tinyhand.html b/docs/reference/theme_tinyhand.html new file mode 100644 index 0000000..d09cc55 --- /dev/null +++ b/docs/reference/theme_tinyhand.html @@ -0,0 +1,171 @@ + +Something you should never use. — theme_tinyhand • hrbrthemes + + +
    +
    + + + +
    +
    + + +
    +

    You should import_tinyhand() first and also install the fonts on your +system before trying to use this theme.

    +
    + +
    +
    theme_tinyhand(
    +  base_family = font_th,
    +  base_size = 10.5,
    +  plot_title_family = font_th,
    +  plot_title_size = 18,
    +  plot_title_face = "bold",
    +  plot_title_margin = 10,
    +  subtitle_family = font_th,
    +  subtitle_size = 13,
    +  subtitle_face = "plain",
    +  subtitle_margin = 15,
    +  strip_text_family = base_family,
    +  strip_text_size = 12,
    +  strip_text_face = "plain",
    +  caption_family = font_th,
    +  caption_size = 9,
    +  caption_face = "plain",
    +  caption_margin = 10,
    +  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
    +)
    +
    + +
    +

    Arguments

    +
    base_family, base_size
    +

    base font family and size

    +
    plot_title_family, plot_title_face, plot_title_size, plot_title_margin
    +

    plot title family, face, size and margin

    +
    subtitle_family, subtitle_face, subtitle_size
    +

    plot subtitle family, face and size

    +
    subtitle_margin
    +

    plot subtitle margin bottom (single numeric value)

    +
    strip_text_family, strip_text_face, strip_text_size
    +

    facet label font family, face and size

    +
    caption_family, caption_face, caption_size, caption_margin
    +

    plot caption family, face, size and margin

    +
    axis_text_size
    +

    font size of axis text

    +
    axis_title_family, axis_title_face, axis_title_size
    +

    axis title font family, face and size

    +
    axis_title_just
    +

    axis title font justification; one of [blmcrt]

    +
    plot_margin
    +

    plot margin (specify with ggplot2::margin)

    +
    grid_col
    +

    grid color

    +
    grid
    +

    panel grid (TRUE, FALSE, or a combination of X, x, Y, y)

    +
    axis_col
    +

    axis color

    +
    axis
    +

    add x or y axes? TRUE, FALSE, "xy"

    +
    ticks
    +

    ticks if TRUE add ticks

    +
    +
    +

    Details

    +

    There is an option hrbrthemes.loadfonts which -- if set to TRUE -- will +call extrafont::loadfonts() to register non-core fonts with R PDF & PostScript +devices. If you are running under Windows, the package calls the same function +to register non-core fonts with the Windows graphics device.

    +
    +
    +

    Why Titillium Web?

    + + +

    It's free, has tolerable kerning pairs and multiple weights. It's also different +than Arial Narrow and the fonts most folks use in ggplot2 charts.

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.0.2.9000.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/update_geom_font_defaults.html b/docs/reference/update_geom_font_defaults.html index dd7edb7..955f557 100644 --- a/docs/reference/update_geom_font_defaults.html +++ b/docs/reference/update_geom_font_defaults.html @@ -1,58 +1,12 @@ - - - - - - - -Update matching font defaults for text geoms — update_geom_font_defaults • hrbrthemes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Update matching font defaults for text geoms — update_geom_font_defaults • hrbrthemes - - - + + -
    -
    - -
    -
    +
    -

    Updates [ggplot2::geom_label] and [ggplot2::geom_text] font defaults

    -
    -
    update_geom_font_defaults(family = "Arial Narrow", face = "plain",
    -  size = 3.5, color = "#2b2b2b")
    - -

    Arguments

    - - - - - - -
    family, face, size, color

    font family name, face, size and color

    - +
    +
    update_geom_font_defaults(
    +  family = "Arial Narrow",
    +  face = "plain",
    +  size = 3.5,
    +  color = "#2b2b2b"
    +)
    +
    -
    - +
    -
    - + +
    + + + - - + diff --git a/docs/sitemap.xml b/docs/sitemap.xml new file mode 100644 index 0000000..dd66701 --- /dev/null +++ b/docs/sitemap.xml @@ -0,0 +1,153 @@ + + + + https://cinc.rud.is/web/packages/hrbrthemes/404.html + + + https://cinc.rud.is/web/packages/hrbrthemes/CONDUCT.html + + + https://cinc.rud.is/web/packages/hrbrthemes/LICENSE-text.html + + + https://cinc.rud.is/web/packages/hrbrthemes/articles/index.html + + + https://cinc.rud.is/web/packages/hrbrthemes/articles/why_hrbrthemes.html + + + https://cinc.rud.is/web/packages/hrbrthemes/authors.html + + + https://cinc.rud.is/web/packages/hrbrthemes/index.html + + + https://cinc.rud.is/web/packages/hrbrthemes/news/index.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/ArialNarrow.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/EconSansCondensed.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/GoldmanSans.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/Inter.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/PlexSans.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/PublicSans.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/RobotoCondensed.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/TinyHand.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/TitilliumWeb.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/flush_ticks.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/ft_cols.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/ft_geom_defaults.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/ft_pal.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/gg_check.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/hrbrthemes-exports.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/hrbrthemes.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/import_econ_sans.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/import_goldman_sans.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/import_inter.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/import_plex_sans.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/import_public_sans.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/import_roboto_condensed.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/import_tinyhand.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/import_titillium_web.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/index.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/ipsum.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/ipsum_pal.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/ipsum_pdf.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/modern_geom_defaults.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/scale_ft.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/scale_ipsum.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/scale_x_percent.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/theme_ipsum.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/theme_ipsum_es.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/theme_ipsum_gs.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/theme_ipsum_inter.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/theme_ipsum_ps.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/theme_ipsum_pub.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/theme_ipsum_rc.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/theme_ipsum_tw.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/theme_tinyhand.html + + + https://cinc.rud.is/web/packages/hrbrthemes/reference/update_geom_font_defaults.html + + diff --git a/man/flush_ticks.Rd b/man/flush_ticks.Rd index 0c994e3..c0fcfbc 100644 --- a/man/flush_ticks.Rd +++ b/man/flush_ticks.Rd @@ -19,12 +19,12 @@ flush_ticks(gg, flush = "XY", plot = TRUE, cat = TRUE) ggplot2 object with \code{theme()} elements added } \description{ -A covenience function intended for basic, fixed-scale plots only (i.e. does not handle +A convenience function intended for basic, fixed-scale plots only (i.e. does not handle free scales in facets).\cr \cr You need to pass in a ggplot2 object to this function. It can't be \code{+}'d in a chain of geoms, coords, scales, themes, etc. It also builds the plot (but does not display -it) so if the plt takes a while (i.e. has lots of data or transforms) this will also +it) so if the plot takes a while (i.e. has lots of data or transforms) this will also take a while. } \note{ diff --git a/man/ipsum.Rd b/man/ipsum.Rd index b15c676..9d42d3e 100644 --- a/man/ipsum.Rd +++ b/man/ipsum.Rd @@ -44,6 +44,8 @@ outputting HTML directly into the markdown document).} \item{dev}{Graphics device to use for figure output (defaults to png)} +\item{smart}{Deprecated} + \item{self_contained}{Produce a standalone HTML file with no external dependencies, using data: URIs to incorporate the contents of linked scripts, stylesheets, images, and videos. Note that even for self contained @@ -62,7 +64,10 @@ copied into the output directory). You can pass an alternate URL or pass \item{extra_dependencies, ...}{Additional function arguments to pass to the base R Markdown HTML output formatter} -\item{css}{One or more css files to include} +\item{css}{CSS and/or Sass files to include. Files with an extension of .sass +or .scss are compiled to CSS via \code{sass::sass()}. Also, if \code{theme} is a +\code{\link[bslib:bs_theme]{bslib::bs_theme()}} object, Sass code may reference the relevant Bootstrap +Sass variables, functions, mixins, etc.} \item{includes}{Named list of additional content to include within the document (typically created using the \code{\link[rmarkdown]{includes}} function).} diff --git a/man/scale_ft.Rd b/man/scale_ft.Rd index 76d2590..fae8610 100644 --- a/man/scale_ft.Rd +++ b/man/scale_ft.Rd @@ -32,7 +32,8 @@ omitted.} \item \code{waiver()} for the default breaks (the scale limits) \item A character vector of breaks \item A function that takes the limits as input and returns breaks -as output +as output. Also accepts rlang \link[rlang:as_function]{lambda} function +notation. }} \item{\code{labels}}{One of: \itemize{ @@ -41,7 +42,8 @@ as output transformation object \item A character vector giving labels (must be same length as \code{breaks}) \item A function that takes the breaks as input and returns labels -as output +as output. Also accepts rlang \link[rlang:as_function]{lambda} function +notation. }} \item{\code{limits}}{One of: \itemize{ @@ -49,7 +51,8 @@ as output \item A character vector that defines possible values of the scale and their order \item A function that accepts the existing (automatic) values and returns -new ones +new ones. Also accepts rlang \link[rlang:as_function]{lambda} function +notation. }} \item{\code{na.translate}}{Unlike continuous scales, discrete scales can easily show missing values, and do so by default. If you want to remove missing values diff --git a/man/scale_ipsum.Rd b/man/scale_ipsum.Rd index e9f133a..87882a2 100644 --- a/man/scale_ipsum.Rd +++ b/man/scale_ipsum.Rd @@ -32,7 +32,8 @@ omitted.} \item \code{waiver()} for the default breaks (the scale limits) \item A character vector of breaks \item A function that takes the limits as input and returns breaks -as output +as output. Also accepts rlang \link[rlang:as_function]{lambda} function +notation. }} \item{\code{labels}}{One of: \itemize{ @@ -41,7 +42,8 @@ as output transformation object \item A character vector giving labels (must be same length as \code{breaks}) \item A function that takes the breaks as input and returns labels -as output +as output. Also accepts rlang \link[rlang:as_function]{lambda} function +notation. }} \item{\code{limits}}{One of: \itemize{ @@ -49,7 +51,8 @@ as output \item A character vector that defines possible values of the scale and their order \item A function that accepts the existing (automatic) values and returns -new ones +new ones. Also accepts rlang \link[rlang:as_function]{lambda} function +notation. }} \item{\code{na.translate}}{Unlike continuous scales, discrete scales can easily show missing values, and do so by default. If you want to remove missing values diff --git a/man/scale_x_percent.Rd b/man/scale_x_percent.Rd index 0682224..de8a8fe 100644 --- a/man/scale_x_percent.Rd +++ b/man/scale_x_percent.Rd @@ -5,7 +5,7 @@ \alias{scale_y_percent} \alias{scale_x_comma} \alias{scale_y_comma} -\title{X & Y scales with opinionated pre-sets for percent & comma label formats} +\title{X & Y scales with opinionated presets for percent & comma label formats} \usage{ scale_x_percent( name = waiver(), @@ -168,5 +168,5 @@ scales, "top" or "bottom" for horizontal scales} The \verb{_comma} ones set comma format for axis text and \code{expand=c(0,0)} (you need to set limits). } \details{ -The \verb{_percent} ones set precent format for axis text and \code{expand=c(0,0)} (you need to set limits). +The \verb{_percent} ones set percent format for axis text and \code{expand=c(0,0)} (you need to set limits). } diff --git a/man/theme_ipsum_es.Rd b/man/theme_ipsum_es.Rd index 678879e..4eef021 100644 --- a/man/theme_ipsum_es.Rd +++ b/man/theme_ipsum_es.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/econ-sans.R \name{theme_ipsum_es} \alias{theme_ipsum_es} -\title{A precise & pristine \link{ggplot2} theme with opinionated defaults and an emphasis on typoghraphy} +\title{A precise & pristine \link{ggplot2} theme with opinionated defaults and an emphasis on typography} \usage{ theme_ipsum_es( base_family = "EconSansCndReg", @@ -41,7 +41,7 @@ theme_ipsum_es( \arguments{ \item{base_family, base_size}{base font family and size} -\item{plot_title_family, plot_title_face, plot_title_size, plot_title_margin}{plot tilte family, face, size and margin} +\item{plot_title_family, plot_title_face, plot_title_size, plot_title_margin}{plot title family, face, size and margin} \item{subtitle_family, subtitle_face, subtitle_size}{plot subtitle family, face and size} @@ -55,7 +55,7 @@ theme_ipsum_es( \item{axis_title_family, axis_title_face, axis_title_size}{axis title font family, face and size} -\item{axis_title_just}{axis title font justificationk one of \verb{[blmcrt]}} +\item{axis_title_just}{axis title font justification; one of \verb{[blmcrt]}} \item{plot_margin}{plot margin (specify with \link[ggplot2:element]{ggplot2::margin})} diff --git a/man/theme_ipsum_gs.Rd b/man/theme_ipsum_gs.Rd index c82377b..f9b1ccb 100644 --- a/man/theme_ipsum_gs.Rd +++ b/man/theme_ipsum_gs.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/goldmansans.R \name{theme_ipsum_gs} \alias{theme_ipsum_gs} -\title{A precise & pristine \link{ggplot2} theme with opinionated defaults and an emphasis on typoghraphy} +\title{A precise & pristine \link{ggplot2} theme with opinionated defaults and an emphasis on typography} \usage{ theme_ipsum_gs( base_family = "Goldman Sans Condensed", @@ -40,7 +40,7 @@ theme_ipsum_gs( \arguments{ \item{base_family, base_size}{base font family and size} -\item{plot_title_family, plot_title_face, plot_title_size, plot_title_margin}{plot tilte family, face, size and margin} +\item{plot_title_family, plot_title_face, plot_title_size, plot_title_margin}{plot title family, face, size and margin} \item{subtitle_family, subtitle_face, subtitle_size}{plot subtitle family, face and size} @@ -54,7 +54,7 @@ theme_ipsum_gs( \item{axis_title_family, axis_title_face, axis_title_size}{axis title font family, face and size} -\item{axis_title_just}{axis title font justificationk one of \verb{[blmcrt]}} +\item{axis_title_just}{axis title font justification; one of \verb{[blmcrt]}} \item{plot_margin}{plot margin (specify with \link[ggplot2:element]{ggplot2::margin})} diff --git a/man/theme_ipsum_inter.Rd b/man/theme_ipsum_inter.Rd index e406657..c3e1691 100644 --- a/man/theme_ipsum_inter.Rd +++ b/man/theme_ipsum_inter.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/inter.R \name{theme_ipsum_inter} \alias{theme_ipsum_inter} -\title{A precise & pristine \link{ggplot2} theme with opinionated defaults and an emphasis on typoghraphy} +\title{A precise & pristine \link{ggplot2} theme with opinionated defaults and an emphasis on typography} \usage{ theme_ipsum_inter( base_family = "Inter-Medium", @@ -40,7 +40,7 @@ theme_ipsum_inter( \arguments{ \item{base_family, base_size}{base font family and size} -\item{plot_title_family, plot_title_face, plot_title_size, plot_title_margin}{plot tilte family, face, size and margin} +\item{plot_title_family, plot_title_face, plot_title_size, plot_title_margin}{plot title family, face, size and margin} \item{subtitle_family, subtitle_face, subtitle_size}{plot subtitle family, face and size} @@ -50,11 +50,11 @@ theme_ipsum_inter( \item{caption_family, caption_face, caption_size, caption_margin}{plot caption family, face, size and margin} -\item{axis_text_size}{font size of axis text} +\item{axis_text_family, axis_text_face, axis_text_size}{axis text font family, face, and size} \item{axis_title_family, axis_title_face, axis_title_size}{axis title font family, face and size} -\item{axis_title_just}{axis title font justificationk one of \verb{[blmcrt]}} +\item{axis_title_just}{axis title font justification; one of \verb{[blmcrt]}} \item{plot_margin}{plot margin (specify with \link[ggplot2:element]{ggplot2::margin})} diff --git a/man/theme_ipsum_ps.Rd b/man/theme_ipsum_ps.Rd index 3f77056..4ee5f2f 100644 --- a/man/theme_ipsum_ps.Rd +++ b/man/theme_ipsum_ps.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/plexsans.R \name{theme_ipsum_ps} \alias{theme_ipsum_ps} -\title{A precise & pristine \link{ggplot2} theme with opinionated defaults and an emphasis on typoghraphy} +\title{A precise & pristine \link{ggplot2} theme with opinionated defaults and an emphasis on typography} \usage{ theme_ipsum_ps( base_family = "IBMPlexSans", @@ -40,7 +40,7 @@ theme_ipsum_ps( \arguments{ \item{base_family, base_size}{base font family and size} -\item{plot_title_family, plot_title_face, plot_title_size, plot_title_margin}{plot tilte family, face, size and margin} +\item{plot_title_family, plot_title_face, plot_title_size, plot_title_margin}{plot title family, face, size and margin} \item{subtitle_family, subtitle_face, subtitle_size}{plot subtitle family, face and size} @@ -54,7 +54,7 @@ theme_ipsum_ps( \item{axis_title_family, axis_title_face, axis_title_size}{axis title font family, face and size} -\item{axis_title_just}{axis title font justificationk one of \verb{[blmcrt]}} +\item{axis_title_just}{axis title font justification; one of \verb{[blmcrt]}} \item{plot_margin}{plot margin (specify with \link[ggplot2:element]{ggplot2::margin})} diff --git a/man/theme_ipsum_pub.Rd b/man/theme_ipsum_pub.Rd index 4bcfa97..83e6011 100644 --- a/man/theme_ipsum_pub.Rd +++ b/man/theme_ipsum_pub.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/public-sans.R \name{theme_ipsum_pub} \alias{theme_ipsum_pub} -\title{A precise & pristine \link{ggplot2} theme with opinionated defaults and an emphasis on typoghraphy} +\title{A precise & pristine \link{ggplot2} theme with opinionated defaults and an emphasis on typography} \usage{ theme_ipsum_pub( base_family = "Public Sans", @@ -41,7 +41,7 @@ theme_ipsum_pub( \arguments{ \item{base_family, base_size}{base font family and size} -\item{plot_title_family, plot_title_face, plot_title_size, plot_title_margin}{plot tilte family, face, size and margin} +\item{plot_title_family, plot_title_face, plot_title_size, plot_title_margin}{plot title family, face, size and margin} \item{subtitle_family, subtitle_face, subtitle_size}{plot subtitle family, face and size} @@ -55,7 +55,7 @@ theme_ipsum_pub( \item{axis_title_family, axis_title_face, axis_title_size}{axis title font family, face and size} -\item{axis_title_just}{axis title font justificationk one of \verb{[blmcrt]}} +\item{axis_title_just}{axis title font justification; one of \verb{[blmcrt]}} \item{plot_margin}{plot margin (specify with \link[ggplot2:element]{ggplot2::margin})} diff --git a/man/theme_ipsum_rc.Rd b/man/theme_ipsum_rc.Rd index 282c0ce..e812885 100644 --- a/man/theme_ipsum_rc.Rd +++ b/man/theme_ipsum_rc.Rd @@ -4,7 +4,7 @@ \alias{theme_ft_rc} \alias{theme_modern_rc} \alias{theme_ipsum_rc} -\title{A precise & pristine \link{ggplot2} theme with opinionated defaults and an emphasis on typoghraphy} +\title{A precise & pristine \link{ggplot2} theme with opinionated defaults and an emphasis on typography} \usage{ theme_ft_rc( base_family = "Roboto Condensed", @@ -105,7 +105,7 @@ theme_ipsum_rc( \arguments{ \item{base_family, base_size}{base font family and size} -\item{plot_title_family, plot_title_face, plot_title_size, plot_title_margin}{plot tilte family, face, size and margin} +\item{plot_title_family, plot_title_face, plot_title_size, plot_title_margin}{plot title family, face, size and margin} \item{subtitle_family, subtitle_face, subtitle_size}{plot subtitle family, face and size} @@ -119,7 +119,7 @@ theme_ipsum_rc( \item{axis_title_family, axis_title_face, axis_title_size}{axis title font family, face and size} -\item{axis_title_just}{axis title font justificationk one of \verb{[blmcrt]}} +\item{axis_title_just}{axis title font justification; one of \verb{[blmcrt]}} \item{plot_margin}{plot margin (specify with \link[ggplot2:element]{ggplot2::margin})} diff --git a/man/theme_ipsum_tw.Rd b/man/theme_ipsum_tw.Rd index 6dd7566..9287ba6 100644 --- a/man/theme_ipsum_tw.Rd +++ b/man/theme_ipsum_tw.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/titillium-web.R \name{theme_ipsum_tw} \alias{theme_ipsum_tw} -\title{A precise & pristine \link{ggplot2} theme with opinionated defaults and an emphasis on typoghraphy} +\title{A precise & pristine \link{ggplot2} theme with opinionated defaults and an emphasis on typography} \usage{ theme_ipsum_tw( base_family = "Titillium Web", @@ -41,7 +41,7 @@ theme_ipsum_tw( \arguments{ \item{base_family, base_size}{base font family and size} -\item{plot_title_family, plot_title_face, plot_title_size, plot_title_margin}{plot tilte family, face, size and margin} +\item{plot_title_family, plot_title_face, plot_title_size, plot_title_margin}{plot title family, face, size and margin} \item{subtitle_family, subtitle_face, subtitle_size}{plot subtitle family, face and size} @@ -55,7 +55,7 @@ theme_ipsum_tw( \item{axis_title_family, axis_title_face, axis_title_size}{axis title font family, face and size} -\item{axis_title_just}{axis title font justificationk one of \verb{[blmcrt]}} +\item{axis_title_just}{axis title font justification; one of \verb{[blmcrt]}} \item{plot_margin}{plot margin (specify with \link[ggplot2:element]{ggplot2::margin})} diff --git a/man/theme_tinyhand.Rd b/man/theme_tinyhand.Rd index 7445091..33b0b34 100644 --- a/man/theme_tinyhand.Rd +++ b/man/theme_tinyhand.Rd @@ -38,7 +38,7 @@ theme_tinyhand( \arguments{ \item{base_family, base_size}{base font family and size} -\item{plot_title_family, plot_title_face, plot_title_size, plot_title_margin}{plot tilte family, face, size and margin} +\item{plot_title_family, plot_title_face, plot_title_size, plot_title_margin}{plot title family, face, size and margin} \item{subtitle_family, subtitle_face, subtitle_size}{plot subtitle family, face and size} @@ -52,7 +52,7 @@ theme_tinyhand( \item{axis_title_family, axis_title_face, axis_title_size}{axis title font family, face and size} -\item{axis_title_just}{axis title font justificationk one of \verb{[blmcrt]}} +\item{axis_title_just}{axis title font justification; one of \verb{[blmcrt]}} \item{plot_margin}{plot margin (specify with \link[ggplot2:element]{ggplot2::margin})} diff --git a/vignettes/why_hrbrthemes.R b/vignettes/why_hrbrthemes.R new file mode 100644 index 0000000..63ae293 --- /dev/null +++ b/vignettes/why_hrbrthemes.R @@ -0,0 +1,17 @@ +## ----echo=FALSE, fig.width=8-------------------------------------------------- +library(ggplot2) +library(gridExtra) + +ggplot(mtcars, aes(wt, mpg)) + + geom_point() + + labs(x="Weight (tons)", y="Efficiency (MPG)", + title="Lorem ipsum dolor sit amet", + subtitle="Mauris ultricies sem volutpat magna venenatis") -> gg + +grid.arrange( + gg + theme_minimal(base_family="serif") + theme(plot.margin=margin(t=20, b=20, l=15, r=30)), + gg + theme_minimal(base_family="sans") + theme(plot.margin=margin(t=20, b=20, l=30, r=15)), + ncol=2 +) + + diff --git a/vignettes/why_hrbrthemes.Rmd b/vignettes/why_hrbrthemes.Rmd index f5dc3ab..053d290 100644 --- a/vignettes/why_hrbrthemes.Rmd +++ b/vignettes/why_hrbrthemes.Rmd @@ -81,7 +81,7 @@ Proportional digits stand out (in a "yes, I just spilled sriracha on my white sh ### Clean and compact -The figure used in the previous section provided an example of condensed/narrow fonts and regular. Chart space is at a premium and it's important to label and annotate your creations (sparingly but sufficiently). Choosing a font that is too wide will reduce your available space and also make it harder to read the text. Choosing a font that is too narrow/compressed/condensed will create different legiibility problems. +The figure used in the previous section provided an example of condensed/narrow fonts and regular. Chart space is at a premium and it's important to label and annotate your creations (sparingly but sufficiently). Choosing a font that is too wide will reduce your available space and also make it harder to read the text. Choosing a font that is too narrow/compressed/condensed will create different legibility problems. NOTE: It's _really_ hard to find a **free** condensed/narrow font with great kerning pairs and tabular digits. Such is the way of things. @@ -106,7 +106,7 @@ There is plenty of room to work with in Open Sans. You can embolden the title, b ### TTF. Meh. -I'll use another over-simplification and state that there two main font types: OTF and TTF (it's another lie of convenience). OTF (OpenType) is more modern and flexible. TTF (TrueType) has been around longer and was a precursor to OTF. If you make PDFs or PostScript files from R you pretty much _need_ to use TTF fonts due to the underlying tooling that it relies on. If you are making PNGs or SVGs you can likely use OTF but most communciations teams and publications want PDFs. +I'll use another over-simplification and state that there two main font types: OTF and TTF (it's another lie of convenience). OTF (OpenType) is more modern and flexible. TTF (TrueType) has been around longer and was a precursor to OTF. If you make PDFs or PostScript files from R you pretty much _need_ to use TTF fonts due to the underlying tooling that it relies on. If you are making PNGs or SVGs you can likely use OTF but most communications teams and publications want PDFs. ## Spacing Out diff --git a/vignettes/why_hrbrthemes.html b/vignettes/why_hrbrthemes.html new file mode 100644 index 0000000..404b0d9 --- /dev/null +++ b/vignettes/why_hrbrthemes.html @@ -0,0 +1,341 @@ + + + + + + + + + + + + + + + + +Why hrbrthemes? + + + + + + + + + + + + + + + + + + + + + + +

    Why hrbrthemes?

    +

    Bob Rudis

    +

    2022-02-11

    + + + + +

    The hrbrthemes package has two goals. First, it provides a base theme that focuses on typographic elements, including where various labels are placed as well as the fonts that are used. The second goal centers around productivity for a production workflow. In fact, this “production workflow” is the context for where the elements of hrbrthemes should be used.

    +

    A “production workflow” is when you intend for the output of your work to be put into a publication of some kind, whether it be a blog post, academic paper, presentation, internal report or industry publication. When you’re cranking through an analysis, the visual elements don’t need to be perfect. They are there to validate/support your work and are more of a starting point for the finished product than anything else. The level of attention to detail on the final graphical products can be a great motivator for your audience to either dive deep into your analysis text or relegate it to the TLDR pile.

    +
    +

    Font Fundamentals

    +

    There are nigh countless tomes written about the colors you should consider using in charts as well as how to produce “minimal” charts (i.e. eliminate “chart junk”). One area that is rarely discussed is the use of fonts in charts (i.e. chart typography). The hrbrthemes package is very opinionated about chart typography:

    +
      +
    • The font family used should be sans-serif typeface
    • +
    • The font family used should have an awesome, default kern[ing] table
    • +
    • The font family used should have tabular figures (digits) vs proportional ones
    • +
    • The font family used should be a condensed or narrow typeface
    • +
    • Ideally, the font family used will have 100, 300, 500, 700 and 900 weights vs regular, bold, italic and bold italic
    • +
    • Because we’re working in ggplot2-land, the font family used should also be a TrueType font (TTF)
    • +
    +
    +

    Why sans-serif?

    +

    To use a gross oversimplification, there are two basic font types: Serif and Sans-serif (that’s a lie of convenience, there are more than two). hrbrthemes suggests using sans-serif fonts since they have a more “modern” feel to them, you’re not producing long-form text and labels on charts may need to scale down to small sizes. Typography nerds on either side of the serif vs sans-serif debate can point to 100+ years of research-based evidence supporting their particular “side”.

    +

    You can compare the typography in the two (non-hrbrthemes) charts below to see if you prefer sans-serif over serif:

    +

    +

    If you work in a company, your communications department likely has a set of core brand fonts and said font groups likely contain both serif and sans-serif and you should strive to keep with the brand image and use whatever font(s) work best or work with your comms team to pick a standard, complementary font for the charts you produce.

    +
    +
    +

    Kern-what?

    +

    Kerning is nothing more than a fancy word for spaces between letters and fonts have built-in tables for how various pairs of letters should be placed next to each other. Great fonts have kerning tables that typography nerds immediately recognize and adore. Fonts with poor kerning tables are easily recognized as such by even the least font-aware viewer.

    +
    +


    +https://www.xkcd.com/1015/

    +
    +

    Bad kerning will be a distraction from the chart contents. Great kerning will be a subconscious reinforcement of just how awesome your visualizations are.

    +
    +
    +

    Tabula Figura

    +

    Tabular digits line up when placed on top of each other. Proportional ones do not. This is best explained visually:

    +
    +

    +
    +

    Can you spot the proportional digits from the tabular ones? (Hint: there are two of each.)

    +

    Proportional digits stand out (in a “yes, I just spilled sriracha on my white shirt” way) when used on the Y axis of a chart and the numeric labels contain numbers of varying widths (like Hind and Encode Sans Condensed in the example above). Using proportional digits will be one further, subtle, subliminal message to viewers that there is something not-quite-awesome about your creation.

    +
    +
    +

    Clean and compact

    +

    The figure used in the previous section provided an example of condensed/narrow fonts and regular. Chart space is at a premium and it’s important to label and annotate your creations (sparingly but sufficiently). Choosing a font that is too wide will reduce your available space and also make it harder to read the text. Choosing a font that is too narrow/compressed/condensed will create different legibility problems.

    +

    NOTE: It’s really hard to find a free condensed/narrow font with great kerning pairs and tabular digits. Such is the way of things.

    +

    (As an aside, the default line-height for Hind and M+ 1c is also sub-optimal and would require tweaking in ggplot2 calls to correct.)

    +
    +
    +

    Weight. What?

    +

    Most fonts (and, more importantly, most free fonts) come in regular, italic, bold and bold italic (which I can’t bring myself to code in here). You really want to avoid italic and bold italic, especially at very small or very large sizes. Bold should be used sparingly as it draws the eye to that text.

    +

    Ideally, you’d use a font with a broad diversity of weights. The term weight can be though of as a numeric scale (the one used here was introduced by TrueType) between 100 and 900 (usually at 100 or 200 increments) or with names ranging from “hairline” through “ultra-black”.

    +

    Take Open Sans, for example:

    +
    +

    +
    +

    There is plenty of room to work with in Open Sans. You can embolden the title, but mute the other labels and choose appropriate label fonts to both enhance style as well as reduce importance. Lighter weights are great for captions and even some direct annotations. Heaver weights should be used sparingly and for emphasis.

    +
    +
    +

    TTF. Meh.

    +

    I’ll use another over-simplification and state that there two main font types: OTF and TTF (it’s another lie of convenience). OTF (OpenType) is more modern and flexible. TTF (TrueType) has been around longer and was a precursor to OTF. If you make PDFs or PostScript files from R you pretty much need to use TTF fonts due to the underlying tooling that it relies on. If you are making PNGs or SVGs you can likely use OTF but most communications teams and publications want PDFs.

    +
    +
    +
    +

    Spacing Out

    +

    Label/title placement is also important, as is the distance between those elements. Put text bits too close to each other or too far apart from each other will send negative subliminal messages. Centering vs left- or right-justification will also convey other messages (old-school vs modern, to put it somewhat bluntly).

    +

    hrbrthemes makes opinionated choices over the spacing between title elements and all labels. For some elements, it makes very new choices (such as the justification of the axis labels).

    +

    The font choices you make may cause you to adjust the hrbrthemes defaults, especially if you choose a font with a wonky line-height.

    +
    + + + + + + + + + + +