Build URL: https://github.com/gadenbuie/xaringanthemer/actions/runs/86315242
Commit: 9e27e3522a
gh-pages
| @@ -183,7 +183,7 @@ img { max-width: 100%; border: none; } | |||
| <h2 class="hasAnchor"> | |||
| <a href="#using-xaringan-themer-css" class="anchor"></a>Using <code>theme_xaringan()</code> without calling a style function</h2> | |||
| <p>Once you’ve set up your custom xaringan theme, you might want to use the theme’s CSS file for new presentations instead of rebuilding your theme with every new slide deck.</p> | |||
| <p>In these cases, <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> will look for a CSS file written by <strong>xaringanthemer</strong> in your slides’ directory or in a subfolder under the same directory that it can use to determine the colors and fonts used in your slides.</p> | |||
| <p>In these cases, <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> will look for a CSS file written by <strong>xaringanthemer</strong> in your slides’ directory or in a sub-folder under the same directory that it can use to determine the colors and fonts used in your slides.</p> | |||
| <p>If you happen to have multiple slide themes written by <strong>xaringanthemer</strong> in the same directory, the one named <code>xaringan-themer.css</code> will be used. If xaringanthemer picks the wrong file, you can use the <code>css_file</code> in <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> to specify exactly which CSS file to use.</p> | |||
| <div class="sourceCode" id="cb6"><html><body><pre class="r"><span class="fu"><a href="../reference/theme_xaringan.html">theme_xaringan</a></span>(<span class="kw">css_file</span> <span class="kw">=</span> <span class="st">"my-slide-style.css"</span>)</pre></body></html></div> | |||
| <p>Note that you can use <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> anywhere you want, not just in xaringan slides! (For example, <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> is working great in these vignettes!) This means that you can use your plot theme in reports and websites while maintaining a consistent look and feel or brand.</p> | |||
| @@ -235,7 +235,7 @@ img { max-width: 100%; border: none; } | |||
| <li><p>Choose a different primary color using the <code>color</code> argument.</p></li> | |||
| <li><p>Use the inverse color slide theme color with <code>inverse = TRUE</code> (only applies when <code>color</code> is not supplied).</p></li> | |||
| <li><p>Invert the direction of the discrete scales with <code>direction = -1</code>.</p></li> | |||
| <li><p>Control the range of the continuous color scale used with <code>begin</code> and <code>end</code>. You can also invert the direction of the continous color scale by setting <code>begin = 1</code> and <code>end = 0</code>.</p></li> | |||
| <li><p>Control the range of the continuous color scale used with <code>begin</code> and <code>end</code>. You can also invert the direction of the continuous color scale by setting <code>begin = 1</code> and <code>end = 0</code>.</p></li> | |||
| </ul> | |||
| </div> | |||
| </div> | |||
| @@ -278,13 +278,13 @@ img { max-width: 100%; border: none; } | |||
| <h3 class="hasAnchor"> | |||
| <a href="#using-fonts-not-in-google-fonts" class="anchor"></a>Using fonts not in Google Fonts</h3> | |||
| <p>If you want to use a font that isn’t in the Google Fonts collection, you need to manually register the font with sysfonts so that it can be used in your plots.</p> | |||
| <p>I found a nice open source font called <a href="https://fontlibrary.org/en/font/glacial-indifference">Glacial Indifference</a> by Alfredo Marco Pradil avilable at <a href="https://fontlibrary.org">fontlibrary.org</a>. In my theme style function, I would use</p> | |||
| <p>I found a nice open source font called <a href="https://fontlibrary.org/en/font/glacial-indifference">Glacial Indifference</a> by Alfredo Marco Pradil available at <a href="https://fontlibrary.org">fontlibrary.org</a>. In my theme style function, I would use</p> | |||
| <pre><code><a href="../reference/style_mono_accent.html">style_mono_accent( | |||
| text_font_family = "GlacialIndifferenceRegular", | |||
| text_font_url = "https://fontlibrary.org/face/glacial-indifference" | |||
| )</a></code></pre> | |||
| <p>but sysfonts won’t know where to find the TTF font files for this font.</p> | |||
| <p>To register the font with sysfont, we use <code><a href="https://rdrr.io/pkg/sysfonts/man/font_add.html">sysfonts::font_add()</a></code>, but first we need to download the font file — the <code><a href="https://rdrr.io/pkg/sysfonts/man/font_add.html">sysfonts::font_add()</a></code> function requires the font file to be local.</p> | |||
| <p>To register the font with sysfonts, we use <code><a href="https://rdrr.io/pkg/sysfonts/man/font_add.html">sysfonts::font_add()</a></code>, but first we need to download the font file — the <code><a href="https://rdrr.io/pkg/sysfonts/man/font_add.html">sysfonts::font_add()</a></code> function requires the font file to be local.</p> | |||
| <p>By inspecting the CSS file at the link I used in <code>text_font_url</code>, I found a direct URL for the <code>.ttf</code> files for <em>GlacialIndifferenceRegular</em>. I’ve included the code I used to download the font to a temporary file below, but in case the URL breaks, I’ve included <em>Glacial Indifference</em> in the xaringanthemer package.</p> | |||
| <div class="sourceCode" id="cb14"><html><body><pre class="r"><span class="no">font_url</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/file.path.html">file.path</a></span>( | |||
| <span class="st">"https://fontlibrary.org/assets/fonts/glacial-indifference"</span>, | |||
| @@ -206,7 +206,7 @@ | |||
| </tr> | |||
| <tr class="odd"> | |||
| <td align="left"><code>background_size</code></td> | |||
| <td align="left">Background image size, requires <code>background_image</code> to be set. If <code>background_image</code> is set, <code>background_size</code> will default to <code>cover</code> so the backround fills the screen. If both <code>background_image</code> and <code>background_position</code> are set, will default to 100 percent</td> | |||
| <td align="left">Background image size, requires <code>background_image</code> to be set. If <code>background_image</code> is set, <code>background_size</code> will default to <code>cover</code> so the background fills the screen. If both <code>background_image</code> and <code>background_position</code> are set, will default to 100 percent</td> | |||
| <td align="left">.remark-slide-content</td> | |||
| <td align="left"><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/background-size">background-size</a></td> | |||
| <td align="left">NULL</td> | |||
| @@ -7,7 +7,7 @@ articles: | |||
| template-variables: template-variables.html | |||
| themes: themes.html | |||
| xaringanthemer: xaringanthemer.html | |||
| last_built: 2020-04-24T01:53Z | |||
| last_built: 2020-04-24T02:24Z | |||
| urls: | |||
| reference: https://pkg.garrickadenbuie.com/xaringanthemer//reference | |||
| article: https://pkg.garrickadenbuie.com/xaringanthemer//articles | |||
| @@ -326,7 +326,7 @@ | |||
| <td> | |||
| <p><code><a href="scale_xaringan.html">scale_xaringan_discrete()</a></code> <code><a href="scale_xaringan.html">scale_xaringan_fill_discrete()</a></code> <code><a href="scale_xaringan.html">scale_xaringan_color_discrete()</a></code> <code><a href="scale_xaringan.html">scale_xaringan_colour_discrete()</a></code> <code><a href="scale_xaringan.html">scale_xaringan_continuous()</a></code> <code><a href="scale_xaringan.html">scale_xaringan_fill_continuous()</a></code> <code><a href="scale_xaringan.html">scale_xaringan_color_continuous()</a></code> <code><a href="scale_xaringan.html">scale_xaringan_colour_continuous()</a></code> </p> | |||
| </td> | |||
| <td><p>Xaringan Themer ggplot2 Scales</p></td> | |||
| <td><p>Themed ggplot2 Scales</p></td> | |||
| </tr> | |||
| </tbody><tbody> | |||
| <tr> | |||
| @@ -6,7 +6,7 @@ | |||
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |||
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |||
| <title>Xaringan Themer ggplot2 Scales — scale_xaringan • xaringanthemer</title> | |||
| <title>Themed ggplot2 Scales — scale_xaringan • xaringanthemer</title> | |||
| <!-- favicons --> | |||
| <link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"> | |||
| @@ -48,7 +48,7 @@ | |||
| <link href="../extra.css" rel="stylesheet"> | |||
| <meta property="og:title" content="Xaringan Themer ggplot2 Scales — scale_xaringan" /> | |||
| <meta property="og:title" content="Themed ggplot2 Scales — scale_xaringan" /> | |||
| <meta property="og:description" content="Lifecycle: Maturing | |||
| Color and fill single-color scales for discrete and continuous values, | |||
| created using the primary accent color of the xaringanthemer styles. See | |||
| @@ -162,7 +162,7 @@ xaringanthemer's ggplot2-related functions." /> | |||
| <div class="row"> | |||
| <div class="col-md-9 contents"> | |||
| <div class="page-header"> | |||
| <h1>Xaringan Themer ggplot2 Scales</h1> | |||
| <h1>Themed ggplot2 Scales</h1> | |||
| <small class="dont-index">Source: <a href='https://github.com/gadenbuie/xaringanthemer/blob/master/R/ggplot2.R'><code>R/ggplot2.R</code></a></small> | |||
| <div class="hidden name"><code>scale_xaringan.Rd</code></div> | |||
| </div> | |||
| @@ -316,7 +316,7 @@ from the title slide. Defaults to <code>NULL</code>. Modifies the | |||
| <th>background_size</th> | |||
| <td><p>Background image size, requires <code>background_image</code> to | |||
| be set. If <code>background_image</code> is set, <code>background_size</code> will default to | |||
| <code>cover</code> so the backround fills the screen. If both <code>background_image</code> and | |||
| <code>cover</code> so the background fills the screen. If both <code>background_image</code> and | |||
| <code>background_position</code> are set, will default to 100 percent. Defaults to | |||
| <code>NULL</code>. Modifies the <code>.remark-slide-content</code> class. Accepts CSS | |||
| <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/background-size'>background-size</a> | |||
| @@ -334,7 +334,7 @@ from the title slide. Defaults to <code>NULL</code>. Modifies the | |||
| <th>background_size</th> | |||
| <td><p>Background image size, requires <code>background_image</code> to | |||
| be set. If <code>background_image</code> is set, <code>background_size</code> will default to | |||
| <code>cover</code> so the backround fills the screen. If both <code>background_image</code> and | |||
| <code>cover</code> so the background fills the screen. If both <code>background_image</code> and | |||
| <code>background_position</code> are set, will default to 100 percent. Defaults to | |||
| <code>NULL</code>. Modifies the <code>.remark-slide-content</code> class. Accepts CSS | |||
| <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/background-size'>background-size</a> | |||
| @@ -335,7 +335,7 @@ from the title slide. Defaults to <code>NULL</code>. Modifies the | |||
| <th>background_size</th> | |||
| <td><p>Background image size, requires <code>background_image</code> to | |||
| be set. If <code>background_image</code> is set, <code>background_size</code> will default to | |||
| <code>cover</code> so the backround fills the screen. If both <code>background_image</code> and | |||
| <code>cover</code> so the background fills the screen. If both <code>background_image</code> and | |||
| <code>background_position</code> are set, will default to 100 percent. Defaults to | |||
| <code>NULL</code>. Modifies the <code>.remark-slide-content</code> class. Accepts CSS | |||
| <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/background-size'>background-size</a> | |||
| @@ -322,7 +322,7 @@ from the title slide. Defaults to <code>NULL</code>. Modifies the | |||
| <th>background_size</th> | |||
| <td><p>Background image size, requires <code>background_image</code> to | |||
| be set. If <code>background_image</code> is set, <code>background_size</code> will default to | |||
| <code>cover</code> so the backround fills the screen. If both <code>background_image</code> and | |||
| <code>cover</code> so the background fills the screen. If both <code>background_image</code> and | |||
| <code>background_position</code> are set, will default to 100 percent. Defaults to | |||
| <code>NULL</code>. Modifies the <code>.remark-slide-content</code> class. Accepts CSS | |||
| <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/background-size'>background-size</a> | |||
| @@ -323,7 +323,7 @@ from the title slide. Defaults to <code>NULL</code>. Modifies the | |||
| <th>background_size</th> | |||
| <td><p>Background image size, requires <code>background_image</code> to | |||
| be set. If <code>background_image</code> is set, <code>background_size</code> will default to | |||
| <code>cover</code> so the backround fills the screen. If both <code>background_image</code> and | |||
| <code>cover</code> so the background fills the screen. If both <code>background_image</code> and | |||
| <code>background_position</code> are set, will default to 100 percent. Defaults to | |||
| <code>NULL</code>. Modifies the <code>.remark-slide-content</code> class. Accepts CSS | |||
| <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/background-size'>background-size</a> | |||
| @@ -322,7 +322,7 @@ from the title slide. Defaults to <code>NULL</code>. Modifies the | |||
| <th>background_size</th> | |||
| <td><p>Background image size, requires <code>background_image</code> to | |||
| be set. If <code>background_image</code> is set, <code>background_size</code> will default to | |||
| <code>cover</code> so the backround fills the screen. If both <code>background_image</code> and | |||
| <code>cover</code> so the background fills the screen. If both <code>background_image</code> and | |||
| <code>background_position</code> are set, will default to 100 percent. Defaults to | |||
| <code>NULL</code>. Modifies the <code>.remark-slide-content</code> class. Accepts CSS | |||
| <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/background-size'>background-size</a> | |||
| @@ -322,7 +322,7 @@ from the title slide. Defaults to <code>NULL</code>. Modifies the | |||
| <th>background_size</th> | |||
| <td><p>Background image size, requires <code>background_image</code> to | |||
| be set. If <code>background_image</code> is set, <code>background_size</code> will default to | |||
| <code>cover</code> so the backround fills the screen. If both <code>background_image</code> and | |||
| <code>cover</code> so the background fills the screen. If both <code>background_image</code> and | |||
| <code>background_position</code> are set, will default to 100 percent. Defaults to | |||
| <code>NULL</code>. Modifies the <code>.remark-slide-content</code> class. Accepts CSS | |||
| <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/background-size'>background-size</a> | |||
| @@ -300,7 +300,7 @@ from the title slide. Defaults to <code>NULL</code>. Modifies the | |||
| <th>background_size</th> | |||
| <td><p>Background image size, requires <code>background_image</code> to | |||
| be set. If <code>background_image</code> is set, <code>background_size</code> will default to | |||
| <code>cover</code> so the backround fills the screen. If both <code>background_image</code> and | |||
| <code>cover</code> so the background fills the screen. If both <code>background_image</code> and | |||
| <code>background_position</code> are set, will default to 100 percent. Defaults to | |||
| <code>NULL</code>. Modifies the <code>.remark-slide-content</code> class. Accepts CSS | |||
| <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/background-size'>background-size</a> | |||
| @@ -300,7 +300,7 @@ from the title slide. Defaults to <code>NULL</code>. Modifies the | |||
| <th>background_size</th> | |||
| <td><p>Background image size, requires <code>background_image</code> to | |||
| be set. If <code>background_image</code> is set, <code>background_size</code> will default to | |||
| <code>cover</code> so the backround fills the screen. If both <code>background_image</code> and | |||
| <code>cover</code> so the background fills the screen. If both <code>background_image</code> and | |||
| <code>background_position</code> are set, will default to 100 percent. Defaults to | |||
| <code>NULL</code>. Modifies the <code>.remark-slide-content</code> class. Accepts CSS | |||
| <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/background-size'>background-size</a> | |||
| @@ -303,7 +303,7 @@ from the title slide. Defaults to <code>NULL</code>. Modifies the | |||
| <th>background_size</th> | |||
| <td><p>Background image size, requires <code>background_image</code> to | |||
| be set. If <code>background_image</code> is set, <code>background_size</code> will default to | |||
| <code>cover</code> so the backround fills the screen. If both <code>background_image</code> and | |||
| <code>cover</code> so the background fills the screen. If both <code>background_image</code> and | |||
| <code>background_position</code> are set, will default to 100 percent. Defaults to | |||
| <code>NULL</code>. Modifies the <code>.remark-slide-content</code> class. Accepts CSS | |||
| <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/background-size'>background-size</a> | |||
| @@ -698,7 +698,7 @@ class with the <code>font-family</code> property. See the <strong>Fonts</strong> | |||
| <ul> | |||
| <li><p><code>xaringanthemer_font_default</code>: Default values for font family, wieght, URLs and | |||
| <li><p><code>xaringanthemer_font_default</code>: Default values for font family, weight, URLs and | |||
| font fallbacks.</p></li> | |||
| </ul> | |||
| <h2 class="hasAnchor" id="usage"><a class="anchor" href="#usage"></a>Usage</h2> | |||