hrbrpkghelpr::global_opts()
knitr::opts_chunk$set( dev = "ragg_png", cache = TRUE )
hrbrpkghelpr::stinking_badges()
hrbrpkghelpr::yank_title_and_description()
The following functions are implemented:
hrbrpkghelpr::describe_ingredients()
hrbrpkghelpr::install_block()
library(tibble) library(hrbragg) library(ggplot2) # current version packageVersion("hrbragg")
For the moment, you'll need to install Inter:
install_inter()
str(inter_pkg, 1) data("feature_dict") feature_dict[feature_dict$tag %in% textshaping::get_font_features("Inter")[[1]],]
ggplot() + geom_point( data = mtcars, aes(mpg, wt, color = factor(cyl)) ) + geom_label( aes( x = 15, y = 5.48, label = "<- A fairly useless annotation\n that uses the custom Inter\n variant by default." ), label.size = 0, hjust = 0, vjust = 1 ) + 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'" ) -> gg1
gg1 + theme_inter(grid = "XY", mode = "dark")
Note the ligatures aren't as nice in Goldman Sans
gg1 + theme_rc(grid = "XY", mode = "dark")
gg1 + theme_gs(grid = "XY", mode = "dark")
gg1 + theme_inter(grid = "XY", mode = "light")
gg1 + theme_rc(grid = "XY", mode = "light")
gg1 + theme_gs(grid = "XY", mode = "light")
ggplot() + geom_point( data = mpg, aes(displ, hwy, color = trans) ) + facet_wrap( vars(cyl, drv), scales = "free", drop = TRUE ) + labs( x = "Displacement", y = "Highway", title = "Another seminal ggplot2 scatterplot example", subtitle = "A plot that is only useful for demonstration purposes", caption = "Brought to you by the letter 'g'" ) -> gg2
gg2 + theme_inter(grid = "XY", mode = "light")
gg2 + theme_inter(grid = "XY", mode = "dark")
preview_variant(inter_pkg)
reconfigure_font( family = "Trattatello", width = "normal", ligatures = "discretionary", calt = 1, tnum = 1, case = 1, dlig = 1, kern = 1, zero = 0, salt = 0 ) -> trat preview_variant(trat)
reconfigure_font( family = "Barlow", width = "normal", ligatures = "standard", tnum = 1, kern = 1 ) -> barlow preview_variant(barlow)
cloc::cloc_pkg_md()
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.