Build URL: https://github.com/gadenbuie/xaringanthemer/actions/runs/85354494
Commit: d1d3042906
gh-pages
| <li><p>The ggplot2 themes <a href="#setup-your-theme">uses the colors and themes</a> from the <strong>xaringanthemer</strong> style functions, if you set your theme inside your slides. Otherwise, it <a href="#using-xaringan-themer-css">draws from the <code>xaringan-themer.css</code> file</a>.</p></li> | <li><p>The ggplot2 themes <a href="#setup-your-theme">uses the colors and themes</a> from the <strong>xaringanthemer</strong> style functions, if you set your theme inside your slides. Otherwise, it <a href="#using-xaringan-themer-css">draws from the <code>xaringan-themer.css</code> file</a>.</p></li> | ||||
| <li><p>The themes <a href="#colors">pick appropriate colors</a> for titles, grid lines, and axis text, and also sets the default colors of geoms like <code><a href="https://ggplot2.tidyverse.org/reference/geom_point.html">ggplot2::geom_point()</a></code> and <code><a href="https://ggplot2.tidyverse.org/reference/geom_text.html">ggplot2::geom_text()</a></code>. There are also monotone <a href="#scale-xaringan">color and fill scales</a> based around the primary accent color used in your xaringan theme.</p></li> | <li><p>The themes <a href="#colors">pick appropriate colors</a> for titles, grid lines, and axis text, and also sets the default colors of geoms like <code><a href="https://ggplot2.tidyverse.org/reference/geom_point.html">ggplot2::geom_point()</a></code> and <code><a href="https://ggplot2.tidyverse.org/reference/geom_text.html">ggplot2::geom_text()</a></code>. There are also monotone <a href="#scale-xaringan">color and fill scales</a> based around the primary accent color used in your xaringan theme.</p></li> | ||||
| <li><p>If you use Google Fonts in your slides, the ggplot2 themes use the showtext package to <a href="#fonts">automatically match the title and axis text fonts</a> of your plots to the heading and text fonts in your xaringan theme.</p></li> | <li><p>If you use Google Fonts in your slides, the ggplot2 themes use the showtext package to <a href="#fonts">automatically match the title and axis text fonts</a> of your plots to the heading and text fonts in your xaringan theme.</p></li> | ||||
| <li><p>I’ve done my best to set up everything so that <em>it just works</em>, but sometimes the showtext package adds a bit of complication to the routine data visualization workflow. At the end of this vignette I include <a href="#tips">a few tips</a> for working with showtext.</p></li> | |||||
| </ul> | </ul> | ||||
| <!-- | |||||
| - I've done my best to set up everything so that _it just works_, but sometimes | |||||
| the showtext package adds a bit of complication to the routine data | |||||
| visualization workflow. At the end of this vignette I include | |||||
| [a few tips](#tips) for working with showtext. | |||||
| --> | |||||
| </div> | </div> | ||||
| <div id="setup-your-theme" class="section level2"> | <div id="setup-your-theme" class="section level2"> | ||||
| <h2 class="hasAnchor"> | <h2 class="hasAnchor"> | ||||
| <a href="#setup-your-theme" class="anchor"></a>Setup Your Theme</h2> | <a href="#setup-your-theme" class="anchor"></a>Setup Your Theme</h2> | ||||
| <p><code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> is designed to automatically use the fonts and colors you used for your slides’ style theme. Here I’m going to use a moderately customized color theme based on <code><a href="../reference/style_mono_accent.html">style_mono_accent()</a></code>, that results in the xaringan theme previewed in the slides above.</p> | <p><code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> is designed to automatically use the fonts and colors you used for your slides’ style theme. Here I’m going to use a moderately customized color theme based on <code><a href="../reference/style_mono_accent.html">style_mono_accent()</a></code>, that results in the xaringan theme previewed in the slides above.</p> | ||||
| <p>I’ve also picked out a few fonts from <a href="https://fonts.google.com">Google Fonts</a> that I would probably never use in a real presentation, but they’re flashy enough to make it easy to see that we’re not using the standard default fonts.</p> | <p>I’ve also picked out a few fonts from <a href="https://fonts.google.com">Google Fonts</a> that I would probably never use in a real presentation, but they’re flashy enough to make it easy to see that we’re not using the standard default fonts.</p> | ||||
| <div class="sourceCode" id="cb1"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb1-1"><a href="#cb1-1"></a><span class="bn">```{r xaringan-themer, include=FALSE}</span></span> | |||||
| <div class="sourceCode" id="cb1"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb1-1"><a href="#cb1-1"></a><span class="bn">```{r xaringan-themer, include=FALSE, warning=FALSE}</span></span> | |||||
| <span id="cb1-2"><a href="#cb1-2"></a><span class="bn">library(xaringanthemer)</span></span> | <span id="cb1-2"><a href="#cb1-2"></a><span class="bn">library(xaringanthemer)</span></span> | ||||
| <span id="cb1-3"><a href="#cb1-3"></a><span class="bn">style_mono_accent(</span></span> | <span id="cb1-3"><a href="#cb1-3"></a><span class="bn">style_mono_accent(</span></span> | ||||
| <span id="cb1-4"><a href="#cb1-4"></a><span class="bn"> base_color = "#DC322F", # bright red</span></span> | <span id="cb1-4"><a href="#cb1-4"></a><span class="bn"> base_color = "#DC322F", # bright red</span></span> | ||||
| <span class="kw">title_font</span> <span class="kw">=</span> <span class="st">"GlacialIndifferenceRegular"</span> | <span class="kw">title_font</span> <span class="kw">=</span> <span class="st">"GlacialIndifferenceRegular"</span> | ||||
| )</pre></body></html></div> | )</pre></body></html></div> | ||||
| <p><img src="ggplot2-themes_files/figure-html/sysfonts-custom-font-1.png" width="960"></p> | <p><img src="ggplot2-themes_files/figure-html/sysfonts-custom-font-1.png" width="960"></p> | ||||
| <!-- ## Tips for using the showtext package {#tips} --> | |||||
| </div> | |||||
| </div> | |||||
| <div id="tips" class="section level2"> | |||||
| <h2 class="hasAnchor"> | |||||
| <a href="#tips" class="anchor"></a>Tips for using the showtext package</h2> | |||||
| <p>Working with fonts is notoriously frustrating, but <a href="https://github.com/yixuan/showtext">showtext</a> and <a href="https://github.com/yixuan/sysfonts">sysfonts</a> do a great job ensuring that Google Fonts and custom fonts work on all platforms. As you’ve seen in the examples above, the process is mostly seamless, but there are a few caveats and places where the methods used by these packages may interrupt a typical ggplot2 workflow.</p> | |||||
| <div id="r-markdown" class="section level3"> | |||||
| <h3 class="hasAnchor"> | |||||
| <a href="#r-markdown" class="anchor"></a>R Markdown</h3> | |||||
| <p>To use the showtext package in R Markdown, knitr requires that the <code>fig.showtext</code> chunk option be set to <code>TRUE</code>, either in the chunk producing the figure or globally in the document.</p> | |||||
| <p>xaringanthemer tries to set this chunk option for you, but in some circumstances it’s possible to call <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> in a way that xaringanthemer can’t set this option for you. When this happens, xaringanthemer will produce an error:</p> | |||||
| <pre><code>Error in verify_fig_showtext(fn) : | |||||
| To use theme_xaringan_base() with knitr, you need to set the chunk | |||||
| option `fig.showtext = TRUE` for this chunk. Or you can set this option | |||||
| globally with `knitr::opts_chunk$set(fig.showtext = TRUE)`.</code></pre> | |||||
| <p>If you find yourself facing this error, follow the instructions and choose one of the two suggestions:</p> | |||||
| <ol style="list-style-type: decimal"> | |||||
| <li><p>Add <code>fig.showtext = TRUE</code> to the chunk producing the figure</p></li> | |||||
| <li><p>Or set the option globally in your <code>setup</code> chunk with <code>knitr::opts_chunk$set(fig.showtext = TRUE)</code>.</p></li> | |||||
| </ol> | |||||
| </div> | |||||
| <div id="macos" class="section level3"> | |||||
| <h3 class="hasAnchor"> | |||||
| <a href="#macos" class="anchor"></a>MacOS</h3> | |||||
| <p>On MacOS, you’ll need to have <code>xquartz</code> installed for <code>sysfonts</code> to work properly. If you use <a href="https://brew.sh/">homebrew</a>, you can install <code>xquartz</code> with</p> | |||||
| <div class="sourceCode" id="cb17"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb17-1"><a href="#cb17-1"></a><span class="ex">brew</span> cask install xquartz</span></code></pre></div> | |||||
| </div> | |||||
| <div id="in-rstudio" class="section level3"> | |||||
| <h3 class="hasAnchor"> | |||||
| <a href="#in-rstudio" class="anchor"></a>In RStudio</h3> | |||||
| <p>showtext and RStudio’s graphic device don’t always work well together. Depending on your version of RStudio, if you try to preview plots that use <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code>, the fonts in the preview will still be the default sans font or you may not see a plot at all.</p> | |||||
| <p>To work around this, open a new <code><a href="https://rdrr.io/r/grDevices/quartz.html">quartz()</a></code> (MacOS) or <code><a href="https://rdrr.io/r/grDevices/x11.html">x11()</a></code> (Windows/Unix) plot device. The plots will then render in a separate window. I usually create a <code><a href="https://rdrr.io/r/grDevices/quartz.html">quartz()</a></code> device with a similar size ratio to my slides.</p> | |||||
| <div class="sourceCode" id="cb18"><html><body><pre class="r"><span class="co">## On Windows</span> | |||||
| <span class="co"># x11(width = 16 * 2/3, height = 9 * 2/3)</span> | |||||
| <span class="co">## On MacOS</span> | |||||
| <span class="fu"><a href="https://rdrr.io/r/grDevices/quartz.html">quartz</a></span>(<span class="kw">width</span> <span class="kw">=</span> <span class="fl">16</span> * <span class="fl">2</span>/<span class="fl">3</span>, <span class="kw">height</span> <span class="kw">=</span> <span class="fl">9</span> * <span class="fl">2</span>/<span class="fl">3</span>) | |||||
| <span class="co">## run plot code to preview in separate window</span> | |||||
| <span class="fu"><a href="https://rdrr.io/r/grDevices/dev.html">dev.off</a></span>() <span class="co"># call when done to close the device</span></pre></body></html></div> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </div> | </div> |
| <span id="cb1-2"><a href="#cb1-2"></a><span class="at"> xaringan:</span><span class="fu">:moon_reader</span><span class="kw">:</span></span> | <span id="cb1-2"><a href="#cb1-2"></a><span class="at"> xaringan:</span><span class="fu">:moon_reader</span><span class="kw">:</span></span> | ||||
| <span id="cb1-3"><a href="#cb1-3"></a><span class="at"> </span><span class="fu">css</span><span class="kw">:</span><span class="at"> xaringan-themer.css</span></span></code></pre></div> | <span id="cb1-3"><a href="#cb1-3"></a><span class="at"> </span><span class="fu">css</span><span class="kw">:</span><span class="at"> xaringan-themer.css</span></span></code></pre></div> | ||||
| <p>Then, in a hidden chunk just after the knitr setup chunk, load <strong>xaringanthemer</strong> and try one of the <a href="#themes">theme functions</a>.</p> | <p>Then, in a hidden chunk just after the knitr setup chunk, load <strong>xaringanthemer</strong> and try one of the <a href="#themes">theme functions</a>.</p> | ||||
| <div class="sourceCode" id="cb2"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb2-1"><a href="#cb2-1"></a><span class="bn">```{r xaringan-themer, include = FALSE}</span></span> | |||||
| <div class="sourceCode" id="cb2"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb2-1"><a href="#cb2-1"></a><span class="bn">```{r xaringan-themer, include=FALSE, warning=FALSE}</span></span> | |||||
| <span id="cb2-2"><a href="#cb2-2"></a><span class="bn">library(xaringanthemer)</span></span> | <span id="cb2-2"><a href="#cb2-2"></a><span class="bn">library(xaringanthemer)</span></span> | ||||
| <span id="cb2-3"><a href="#cb2-3"></a><span class="bn">style_mono_accent(</span></span> | <span id="cb2-3"><a href="#cb2-3"></a><span class="bn">style_mono_accent(</span></span> | ||||
| <span id="cb2-4"><a href="#cb2-4"></a><span class="bn"> base_color = "#1c5253",</span></span> | <span id="cb2-4"><a href="#cb2-4"></a><span class="bn"> base_color = "#1c5253",</span></span> | ||||
| <a href="#matching-ggplot-themes" class="anchor"></a>Matching ggplot Themes</h3> | <a href="#matching-ggplot-themes" class="anchor"></a>Matching ggplot Themes</h3> | ||||
| <p><strong>xaringanthemer</strong> even provides a [ggplot2] theme with <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> that uses the colors and fonts from your slide theme. Built on the <a href="https://github.com/yixuan/showtext">showtext</a> package, and designed to work seamlessly with <a href="https://fonts.google.com">Google Fonts</a>.</p> | <p><strong>xaringanthemer</strong> even provides a [ggplot2] theme with <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> that uses the colors and fonts from your slide theme. Built on the <a href="https://github.com/yixuan/showtext">showtext</a> package, and designed to work seamlessly with <a href="https://fonts.google.com">Google Fonts</a>.</p> | ||||
| <p>Color and fill scales are also provided for matching sequential color scales based on the primary color used in your slides. See <code><a href="../reference/scale_xaringan.html">?scale_xaringan</a></code> for more details.</p> | <p>Color and fill scales are also provided for matching sequential color scales based on the primary color used in your slides. See <code><a href="../reference/scale_xaringan.html">?scale_xaringan</a></code> for more details.</p> | ||||
| <p>More details and examples can be found in <code><a href="../articles/ggplot2-themes.html">vignette("ggplot2-themes")</a></code>.</p> | |||||
| <div class="sourceCode" id="cb3"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/library.html">library</a></span>(<span class="no">ggplot2</span>) | <div class="sourceCode" id="cb3"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/library.html">library</a></span>(<span class="no">ggplot2</span>) | ||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span>(<span class="no">diamonds</span>) + | <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span>(<span class="no">diamonds</span>) + | ||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span>(<span class="no">cut</span>, <span class="kw">fill</span> <span class="kw">=</span> <span class="no">cut</span>) + | <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span>(<span class="no">cut</span>, <span class="kw">fill</span> <span class="kw">=</span> <span class="no">cut</span>) + |
| <span id="cb3-2"><a href="#cb3-2"></a><span class="at"> xaringan:</span><span class="fu">:moon_reader</span><span class="kw">:</span></span> | <span id="cb3-2"><a href="#cb3-2"></a><span class="at"> xaringan:</span><span class="fu">:moon_reader</span><span class="kw">:</span></span> | ||||
| <span id="cb3-3"><a href="#cb3-3"></a><span class="at"> </span><span class="fu">css</span><span class="kw">:</span><span class="at"> xaringan-themer.css</span></span></code></pre></div> | <span id="cb3-3"><a href="#cb3-3"></a><span class="at"> </span><span class="fu">css</span><span class="kw">:</span><span class="at"> xaringan-themer.css</span></span></code></pre></div> | ||||
| <p>Then, in a hidden chunk just after the knitr setup chunk, load <strong>xaringanthemer</strong> and try one of the <a href="#themes">theme functions</a>.</p> | <p>Then, in a hidden chunk just after the knitr setup chunk, load <strong>xaringanthemer</strong> and try one of the <a href="#themes">theme functions</a>.</p> | ||||
| <div class="sourceCode" id="cb4"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb4-1"><a href="#cb4-1"></a><span class="bn">```{r xaringan-themer, include = FALSE}</span></span> | |||||
| <div class="sourceCode" id="cb4"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb4-1"><a href="#cb4-1"></a><span class="bn">```{r xaringan-themer, include=FALSE, warning=FALSE}</span></span> | |||||
| <span id="cb4-2"><a href="#cb4-2"></a><span class="bn">library(xaringanthemer)</span></span> | <span id="cb4-2"><a href="#cb4-2"></a><span class="bn">library(xaringanthemer)</span></span> | ||||
| <span id="cb4-3"><a href="#cb4-3"></a><span class="bn">style_mono_accent(</span></span> | <span id="cb4-3"><a href="#cb4-3"></a><span class="bn">style_mono_accent(</span></span> | ||||
| <span id="cb4-4"><a href="#cb4-4"></a><span class="bn"> base_color = "#1c5253",</span></span> | <span id="cb4-4"><a href="#cb4-4"></a><span class="bn"> base_color = "#1c5253",</span></span> | ||||
| <a href="#matching-ggplot-themes" class="anchor"></a>Matching ggplot Themes</h3> | <a href="#matching-ggplot-themes" class="anchor"></a>Matching ggplot Themes</h3> | ||||
| <p><strong>xaringanthemer</strong> even provides a <a href="https://ggplot2.tidyverse.org">ggplot2</a> theme with <code><a href="reference/theme_xaringan.html">theme_xaringan()</a></code> that uses the colors and fonts from your slide theme. Built on the <a href="https://github.com/yixuan/showtext">showtext</a> package, and designed to work seamlessly with <a href="https://fonts.google.com">Google Fonts</a>.</p> | <p><strong>xaringanthemer</strong> even provides a <a href="https://ggplot2.tidyverse.org">ggplot2</a> theme with <code><a href="reference/theme_xaringan.html">theme_xaringan()</a></code> that uses the colors and fonts from your slide theme. Built on the <a href="https://github.com/yixuan/showtext">showtext</a> package, and designed to work seamlessly with <a href="https://fonts.google.com">Google Fonts</a>.</p> | ||||
| <p>Color and fill scales are also provided for matching sequential color scales based on the primary color used in your slides. See <code><a href="reference/scale_xaringan.html">?scale_xaringan</a></code> for more details.</p> | <p>Color and fill scales are also provided for matching sequential color scales based on the primary color used in your slides. See <code><a href="reference/scale_xaringan.html">?scale_xaringan</a></code> for more details.</p> | ||||
| <p>More details and examples can be found in <code><a href="articles/ggplot2-themes.html">vignette("ggplot2-themes")</a></code>.</p> | |||||
| <div class="sourceCode" id="cb5"><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/library.html">library</a></span>(<span class="no">ggplot2</span>) | <div class="sourceCode" id="cb5"><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/library.html">library</a></span>(<span class="no">ggplot2</span>) | ||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span>(<span class="no">diamonds</span>) + | <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span>(<span class="no">diamonds</span>) + | ||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span>(<span class="no">cut</span>, <span class="kw">fill</span> <span class="kw">=</span> <span class="no">cut</span>) + | <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span>(<span class="no">cut</span>, <span class="kw">fill</span> <span class="kw">=</span> <span class="no">cut</span>) + |
| template-variables: template-variables.html | template-variables: template-variables.html | ||||
| themes: themes.html | themes: themes.html | ||||
| xaringanthemer: xaringanthemer.html | xaringanthemer: xaringanthemer.html | ||||
| last_built: 2020-04-22T20:08Z | |||||
| last_built: 2020-04-23T03:13Z | |||||
| urls: | urls: | ||||
| reference: https://pkg.garrickadenbuie.com/xaringanthemer//reference | reference: https://pkg.garrickadenbuie.com/xaringanthemer//reference | ||||
| article: https://pkg.garrickadenbuie.com/xaringanthemer//articles | article: https://pkg.garrickadenbuie.com/xaringanthemer//articles |
| <meta property="og:title" content="Xaringan Themer ggplot2 Scales — scale_xaringan" /> | <meta property="og:title" content="Xaringan Themer ggplot2 Scales — scale_xaringan" /> | ||||
| <meta property="og:description" content="Lifecycle: Maturing | <meta property="og:description" content="Lifecycle: Maturing | ||||
| Color and fill single-color scales for discrete and continuous values, | Color and fill single-color scales for discrete and continuous values, | ||||
| created using the primary accent color of the xaringanthemer styles." /> | |||||
| created using the primary accent color of the xaringanthemer styles. See | |||||
| vignette("ggplot2-themes") for more information and examples of | |||||
| xaringanthemer's ggplot2-related functions." /> | |||||
| <meta property="og:image" content="https://pkg.garrickadenbuie.com/xaringanthemer/logo.png" /> | <meta property="og:image" content="https://pkg.garrickadenbuie.com/xaringanthemer/logo.png" /> | ||||
| <meta name="twitter:card" content="summary" /> | <meta name="twitter:card" content="summary" /> | ||||
| <meta name="twitter:creator" content="@grrrck" /> | <meta name="twitter:creator" content="@grrrck" /> | ||||
| <div class="ref-description"> | <div class="ref-description"> | ||||
| <p><strong>Lifecycle:</strong> <a href='https://www.tidyverse.org/lifecycle/#maturing'>Maturing</a></p> | <p><strong>Lifecycle:</strong> <a href='https://www.tidyverse.org/lifecycle/#maturing'>Maturing</a></p> | ||||
| <p>Color and fill single-color scales for discrete and continuous values, | <p>Color and fill single-color scales for discrete and continuous values, | ||||
| created using the primary accent color of the xaringanthemer styles.</p> | |||||
| created using the primary accent color of the xaringanthemer styles. See | |||||
| <code><a href='../articles/ggplot2-themes.html'>vignette("ggplot2-themes")</a></code> for more information and examples of | |||||
| <span class="pkg">xaringanthemer</span>'s <span class="pkg">ggplot2</span>-related functions.</p> | |||||
| </div> | </div> | ||||
| <pre class="usage"><span class='fu'>scale_xaringan_discrete</span>( | <pre class="usage"><span class='fu'>scale_xaringan_discrete</span>( | ||||
| <tr> | <tr> | ||||
| <th>...</th> | <th>...</th> | ||||
| <td><p>Arguments passed on to either the <span class="pkg">colorspace</span> scale | <td><p>Arguments passed on to either the <span class="pkg">colorspace</span> scale | ||||
| functions — one of <a href='http://colorspace.R-Forge.R-project.org//reference/scale_colour_discrete_sequential.html'>colorspace::scale_color_discrete_sequential</a>, | |||||
| <a href='http://colorspace.R-Forge.R-project.org//reference/scale_colour_continuous_sequential.html'>colorspace::scale_color_continuous_sequential</a>, | |||||
| <a href='http://colorspace.R-Forge.R-project.org//reference/scale_colour_discrete_sequential.html'>colorspace::scale_fill_discrete_sequential</a>, or | |||||
| <a href='http://colorspace.R-Forge.R-project.org//reference/scale_colour_continuous_sequential.html'>colorspace::scale_fill_continuous_sequential</a> — or to | |||||
| functions — one of <code><a href='http://colorspace.R-Forge.R-project.org//reference/scale_colour_discrete_sequential.html'>colorspace::scale_color_discrete_sequential()</a></code>, | |||||
| <code><a href='http://colorspace.R-Forge.R-project.org//reference/scale_colour_continuous_sequential.html'>colorspace::scale_color_continuous_sequential()</a></code>, | |||||
| <code><a href='http://colorspace.R-Forge.R-project.org//reference/scale_colour_discrete_sequential.html'>colorspace::scale_fill_discrete_sequential()</a></code>, or | |||||
| <code><a href='http://colorspace.R-Forge.R-project.org//reference/scale_colour_continuous_sequential.html'>colorspace::scale_fill_continuous_sequential()</a></code> — or to | |||||
| <a href='https://ggplot2.tidyverse.org/reference/continuous_scale.html'>ggplot2::continuous_scale</a> or <a href='https://ggplot2.tidyverse.org/reference/discrete_scale.html'>ggplot2::discrete_scale</a>.</p></td> | <a href='https://ggplot2.tidyverse.org/reference/continuous_scale.html'>ggplot2::continuous_scale</a> or <a href='https://ggplot2.tidyverse.org/reference/discrete_scale.html'>ggplot2::discrete_scale</a>.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> |
| <span class='kw'>inverse_text_color</span> <span class='kw'>=</span> <span class='st'>"#002b3"</span>, | <span class='kw'>inverse_text_color</span> <span class='kw'>=</span> <span class='st'>"#002b3"</span>, | ||||
| <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='no'>xaringan_themer_css</span> <span class='co'># omit in your slides to write the</span> | <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='no'>xaringan_themer_css</span> <span class='co'># omit in your slides to write the</span> | ||||
| <span class='co'># styles to xaringan-themer.css</span> | <span class='co'># styles to xaringan-themer.css</span> | ||||
| ) | |||||
| <span class='co'># View the CSS:</span> | |||||
| <span class='co'># file.edit(xaringan_themer_css)</span></div></pre> | |||||
| )</div><div class='output co'>#> <span class='warning'>Warning: Colors that will be used by `theme_xaringan()` need to be in hexadecimal format: text_color, inverse_text_color</span></div><div class='input'> | |||||
| # View the CSS: | |||||
| # file.edit(xaringan_themer_css) | |||||
| </div></pre> | |||||
| </div> | </div> | ||||
| <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | ||||
| <nav id="toc" data-toggle="toc" class="sticky-top"> | <nav id="toc" data-toggle="toc" class="sticky-top"> |
| <meta property="og:description" content="Lifecycle: Maturing | <meta property="og:description" content="Lifecycle: Maturing | ||||
| Creates ggplot2 themes to match the xaringanthemer theme used in the | Creates ggplot2 themes to match the xaringanthemer theme used in the | ||||
| xaringan slides that seamlessly matches the "normal" slide colors and | xaringan slides that seamlessly matches the "normal" slide colors and | ||||
| styles." /> | |||||
| styles. See vignette("ggplot2-themes") for more information and examples." /> | |||||
| <meta property="og:image" content="https://pkg.garrickadenbuie.com/xaringanthemer/logo.png" /> | <meta property="og:image" content="https://pkg.garrickadenbuie.com/xaringanthemer/logo.png" /> | ||||
| <meta name="twitter:card" content="summary" /> | <meta name="twitter:card" content="summary" /> | ||||
| <meta name="twitter:creator" content="@grrrck" /> | <meta name="twitter:creator" content="@grrrck" /> | ||||
| <p><strong>Lifecycle:</strong> <a href='https://www.tidyverse.org/lifecycle/#maturing'>Maturing</a></p> | <p><strong>Lifecycle:</strong> <a href='https://www.tidyverse.org/lifecycle/#maturing'>Maturing</a></p> | ||||
| <p>Creates <span class="pkg">ggplot2</span> themes to match the xaringanthemer theme used in the | <p>Creates <span class="pkg">ggplot2</span> themes to match the xaringanthemer theme used in the | ||||
| <span class="pkg">xaringan</span> slides that seamlessly matches the "normal" slide colors and | <span class="pkg">xaringan</span> slides that seamlessly matches the "normal" slide colors and | ||||
| styles.</p> | |||||
| styles. See <code><a href='../articles/ggplot2-themes.html'>vignette("ggplot2-themes")</a></code> for more information and examples.</p> | |||||
| </div> | </div> | ||||
| <pre class="usage"><span class='fu'>theme_xaringan</span>( | <pre class="usage"><span class='fu'>theme_xaringan</span>( |
| <meta property="og:title" content="The ggplot2 xaringanthemer base plot theme — theme_xaringan_base" /> | <meta property="og:title" content="The ggplot2 xaringanthemer base plot theme — theme_xaringan_base" /> | ||||
| <meta property="og:description" content="Lifecycle: Maturing | <meta property="og:description" content="Lifecycle: Maturing | ||||
| Provides a base plot theme for ggplot2 to match the xaringan slide theme | |||||
| created by xaringanthemer. The theme is designed to create a general plot | |||||
| style from two colors, a background_color and a text_color (or foreground | |||||
| color). Also accepts an accent_color and an accent_secondary_color that are | |||||
| xaringanthemer is not required for the base theme. Use | |||||
| theme_xaringan() or theme_xaringan_inverse() in xaringan slides styled by | |||||
| xaringanthemer for a plot theme that matches the slide style." /> | |||||
| Provides a base plot theme for ggplot2 to match the xaringan | |||||
| slide theme created by xaringanthemer. The theme is designed to create a | |||||
| general plot style from two colors, a background_color and a text_color | |||||
| (or foreground color). Also accepts an accent_color and an | |||||
| accent_secondary_color that are xaringanthemer is not required for the | |||||
| base theme. Use theme_xaringan() or theme_xaringan_inverse() in xaringan | |||||
| slides styled by xaringanthemer for a plot theme that matches the slide | |||||
| style. See vignette("ggplot2-themes") for more information and examples." /> | |||||
| <meta property="og:image" content="https://pkg.garrickadenbuie.com/xaringanthemer/logo.png" /> | <meta property="og:image" content="https://pkg.garrickadenbuie.com/xaringanthemer/logo.png" /> | ||||
| <meta name="twitter:card" content="summary" /> | <meta name="twitter:card" content="summary" /> | ||||
| <meta name="twitter:creator" content="@grrrck" /> | <meta name="twitter:creator" content="@grrrck" /> | ||||
| <div class="ref-description"> | <div class="ref-description"> | ||||
| <p><strong>Lifecycle:</strong> <a href='https://www.tidyverse.org/lifecycle/#maturing'>Maturing</a></p> | <p><strong>Lifecycle:</strong> <a href='https://www.tidyverse.org/lifecycle/#maturing'>Maturing</a></p> | ||||
| <p>Provides a base plot theme for <span class="pkg">ggplot2</span> to match the <span class="pkg">xaringan</span> slide theme | |||||
| created by <a href='xaringanthemer-package.html'>xaringanthemer</a>. The theme is designed to create a general plot | |||||
| style from two colors, a <code>background_color</code> and a <code>text_color</code> (or foreground | |||||
| color). Also accepts an <code>accent_color</code> and an <code>accent_secondary_color</code> that are | |||||
| <a href='xaringanthemer-package.html'>xaringanthemer</a> is not required for the base theme. Use | |||||
| <code><a href='theme_xaringan.html'>theme_xaringan()</a></code> or <code><a href='theme_xaringan_inverse.html'>theme_xaringan_inverse()</a></code> in xaringan slides styled by | |||||
| xaringanthemer for a plot theme that matches the slide style.</p> | |||||
| <p>Provides a base plot theme for <span class="pkg">ggplot2</span> to match the <span class="pkg">xaringan</span> | |||||
| slide theme created by <a href='xaringanthemer-package.html'>xaringanthemer</a>. The theme is designed to create a | |||||
| general plot style from two colors, a <code>background_color</code> and a <code>text_color</code> | |||||
| (or foreground color). Also accepts an <code>accent_color</code> and an | |||||
| <code>accent_secondary_color</code> that are <a href='xaringanthemer-package.html'>xaringanthemer</a> is not required for the | |||||
| base theme. Use <code><a href='theme_xaringan.html'>theme_xaringan()</a></code> or <code><a href='theme_xaringan_inverse.html'>theme_xaringan_inverse()</a></code> in xaringan | |||||
| slides styled by xaringanthemer for a plot theme that matches the slide | |||||
| style. See <code><a href='../articles/ggplot2-themes.html'>vignette("ggplot2-themes")</a></code> for more information and examples.</p> | |||||
| </div> | </div> | ||||
| <pre class="usage"><span class='fu'>theme_xaringan_base</span>( | <pre class="usage"><span class='fu'>theme_xaringan_base</span>( |
| <meta property="og:title" content="An Inverse Plot Theme for ggplot2 by xaringanthemer — theme_xaringan_inverse" /> | <meta property="og:title" content="An Inverse Plot Theme for ggplot2 by xaringanthemer — theme_xaringan_inverse" /> | ||||
| <meta property="og:description" content="Lifecycle: Maturing | <meta property="og:description" content="Lifecycle: Maturing | ||||
| A ggplot2 xaringanthemer plot theme to seamlessly match the "inverse" | A ggplot2 xaringanthemer plot theme to seamlessly match the "inverse" | ||||
| xaringan slide colors and styles as styled by xaringanthemer." /> | |||||
| xaringan slide colors and styles as styled by xaringanthemer. See | |||||
| vignette("ggplot2-themes") for more information and examples." /> | |||||
| <meta property="og:image" content="https://pkg.garrickadenbuie.com/xaringanthemer/logo.png" /> | <meta property="og:image" content="https://pkg.garrickadenbuie.com/xaringanthemer/logo.png" /> | ||||
| <meta name="twitter:card" content="summary" /> | <meta name="twitter:card" content="summary" /> | ||||
| <meta name="twitter:creator" content="@grrrck" /> | <meta name="twitter:creator" content="@grrrck" /> | ||||
| <div class="ref-description"> | <div class="ref-description"> | ||||
| <p><strong>Lifecycle:</strong> <a href='https://www.tidyverse.org/lifecycle/#maturing'>Maturing</a></p> | <p><strong>Lifecycle:</strong> <a href='https://www.tidyverse.org/lifecycle/#maturing'>Maturing</a></p> | ||||
| <p>A <span class="pkg">ggplot2</span> xaringanthemer plot theme to seamlessly match the "inverse" | <p>A <span class="pkg">ggplot2</span> xaringanthemer plot theme to seamlessly match the "inverse" | ||||
| <span class="pkg">xaringan</span> slide colors and styles as styled by <a href='xaringanthemer-package.html'>xaringanthemer</a>.</p> | |||||
| <span class="pkg">xaringan</span> slide colors and styles as styled by <a href='xaringanthemer-package.html'>xaringanthemer</a>. See | |||||
| <code><a href='../articles/ggplot2-themes.html'>vignette("ggplot2-themes")</a></code> for more information and examples.</p> | |||||
| </div> | </div> | ||||
| <pre class="usage"><span class='fu'>theme_xaringan_inverse</span>( | <pre class="usage"><span class='fu'>theme_xaringan_inverse</span>( |