<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="These scales allow more specific aesthetic mappings to be made when using geom_slabinterval()
and stats/geoms based on it (like eye plots)."><title>Sub-geometry scales for geom_slabinterval (ggplot2 scales) — sub-geometry-scales • ggdist</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Source_Sans_Pro-0.4.8/font.css" rel="stylesheet"><link href="../deps/Source_Code_Pro-0.4.8/font.css" rel="stylesheet"><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Sub-geometry scales for geom_slabinterval (ggplot2 scales) — sub-geometry-scales"><meta property="og:description" content="These scales allow more specific aesthetic mappings to be made when using geom_slabinterval()
and stats/geoms based on it (like eye plots)."><meta property="og:image" content="http://mjskay.github.io/ggdist/logo.svg"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]--><!-- Global site tag (gtag.js) - Google Analytics --><script async src="https://www.googletagmanager.com/gtag/js?id=UA-93322-5"></script><script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-93322-5');
</script></head><body>
    <a href="#main" class="visually-hidden-focusable">Skip to contents</a>
    

    <nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
    
    <a class="navbar-brand me-2" href="../index.html">ggdist</a>

    <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.3.2</small>

    
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>

    <div id="navbar" class="collapse navbar-collapse ms-3">
      <ul class="navbar-nav me-auto"><li class="active nav-item">
  <a class="nav-link" href="../reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
  <a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
  <div class="dropdown-menu" aria-labelledby="dropdown-articles">
    <a class="dropdown-item" href="../articles/dotsinterval.html">Dots + interval stats and geoms</a>
    <a class="dropdown-item" href="../articles/freq-uncertainty-vis.html">Frequentist uncertainty visualization</a>
    <a class="dropdown-item" href="../articles/lineribbon.html">Lineribbon stats and geoms</a>
    <a class="dropdown-item" href="../articles/slabinterval.html">Slab + interval stats and geoms</a>
    <a class="dropdown-item" href="../articles/thickness.html">Thickness scale</a>
  </div>
</li>
<li class="nav-item">
  <a class="nav-link" href="../news/index.html">Changelog</a>
</li>
      </ul><form class="form-inline my-2 my-lg-0" role="search">
        <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>

      <ul class="navbar-nav"><li class="nav-item">
  <a class="external-link nav-link" href="https://github.com/mjskay/ggdist/" aria-label="github">
    <span class="fab fa fab fa-github fa-lg"></span>
     
  </a>
</li>
      </ul></div>

    
  </div>
</nav><div class="container template-reference-topic">
<div class="row">
  <main id="main" class="col-md-9"><div class="page-header">
      <img src="../logo.svg" class="logo" alt=""><h1>Sub-geometry scales for geom_slabinterval (ggplot2 scales)</h1>
      <small class="dont-index">Source: <a href="https://github.com/mjskay/ggdist/blob/HEAD/R/scale_.R" class="external-link"><code>R/scale_.R</code></a></small>
      <div class="d-none name"><code>sub-geometry-scales.Rd</code></div>
    </div>

    <div class="ref-description section level2">
    <p>These scales allow more specific aesthetic mappings to be made when using <code><a href="geom_slabinterval.html">geom_slabinterval()</a></code>
and stats/geoms based on it (like eye plots).</p>
    </div>

    <div class="section level2">
    <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
    <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">scale_point_colour_discrete</span><span class="op">(</span><span class="va">...</span>, aesthetics <span class="op">=</span> <span class="st">"point_colour"</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_point_color_discrete</span><span class="op">(</span><span class="va">...</span>, aesthetics <span class="op">=</span> <span class="st">"point_colour"</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_point_colour_continuous</span><span class="op">(</span></span>
<span>  <span class="va">...</span>,</span>
<span>  aesthetics <span class="op">=</span> <span class="st">"point_colour"</span>,</span>
<span>  guide <span class="op">=</span> <span class="fu">guide_colourbar2</span><span class="op">(</span><span class="op">)</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_point_color_continuous</span><span class="op">(</span></span>
<span>  <span class="va">...</span>,</span>
<span>  aesthetics <span class="op">=</span> <span class="st">"point_colour"</span>,</span>
<span>  guide <span class="op">=</span> <span class="fu">guide_colourbar2</span><span class="op">(</span><span class="op">)</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_point_fill_discrete</span><span class="op">(</span><span class="va">...</span>, aesthetics <span class="op">=</span> <span class="st">"point_fill"</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_point_fill_continuous</span><span class="op">(</span></span>
<span>  <span class="va">...</span>,</span>
<span>  aesthetics <span class="op">=</span> <span class="st">"point_fill"</span>,</span>
<span>  guide <span class="op">=</span> <span class="fu">guide_colourbar2</span><span class="op">(</span><span class="op">)</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_point_alpha_continuous</span><span class="op">(</span><span class="va">...</span>, range <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">0.1</span>, <span class="fl">1</span><span class="op">)</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_point_alpha_discrete</span><span class="op">(</span><span class="va">...</span>, range <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">0.1</span>, <span class="fl">1</span><span class="op">)</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_point_size_continuous</span><span class="op">(</span><span class="va">...</span>, range <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">6</span><span class="op">)</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_point_size_discrete</span><span class="op">(</span><span class="va">...</span>, range <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">6</span><span class="op">)</span>, na.translate <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_interval_colour_discrete</span><span class="op">(</span><span class="va">...</span>, aesthetics <span class="op">=</span> <span class="st">"interval_colour"</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_interval_color_discrete</span><span class="op">(</span><span class="va">...</span>, aesthetics <span class="op">=</span> <span class="st">"interval_colour"</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_interval_colour_continuous</span><span class="op">(</span></span>
<span>  <span class="va">...</span>,</span>
<span>  aesthetics <span class="op">=</span> <span class="st">"interval_colour"</span>,</span>
<span>  guide <span class="op">=</span> <span class="fu">guide_colourbar2</span><span class="op">(</span><span class="op">)</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_interval_color_continuous</span><span class="op">(</span></span>
<span>  <span class="va">...</span>,</span>
<span>  aesthetics <span class="op">=</span> <span class="st">"interval_colour"</span>,</span>
<span>  guide <span class="op">=</span> <span class="fu">guide_colourbar2</span><span class="op">(</span><span class="op">)</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_interval_alpha_continuous</span><span class="op">(</span><span class="va">...</span>, range <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">0.1</span>, <span class="fl">1</span><span class="op">)</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_interval_alpha_discrete</span><span class="op">(</span><span class="va">...</span>, range <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">0.1</span>, <span class="fl">1</span><span class="op">)</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_interval_size_continuous</span><span class="op">(</span><span class="va">...</span>, range <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">6</span><span class="op">)</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_interval_size_discrete</span><span class="op">(</span><span class="va">...</span>, range <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">6</span><span class="op">)</span>, na.translate <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_interval_linetype_discrete</span><span class="op">(</span><span class="va">...</span>, na.value <span class="op">=</span> <span class="st">"blank"</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_interval_linetype_continuous</span><span class="op">(</span><span class="va">...</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_slab_colour_discrete</span><span class="op">(</span><span class="va">...</span>, aesthetics <span class="op">=</span> <span class="st">"slab_colour"</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_slab_color_discrete</span><span class="op">(</span><span class="va">...</span>, aesthetics <span class="op">=</span> <span class="st">"slab_colour"</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_slab_colour_continuous</span><span class="op">(</span></span>
<span>  <span class="va">...</span>,</span>
<span>  aesthetics <span class="op">=</span> <span class="st">"slab_colour"</span>,</span>
<span>  guide <span class="op">=</span> <span class="fu">guide_colourbar2</span><span class="op">(</span><span class="op">)</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_slab_color_continuous</span><span class="op">(</span></span>
<span>  <span class="va">...</span>,</span>
<span>  aesthetics <span class="op">=</span> <span class="st">"slab_colour"</span>,</span>
<span>  guide <span class="op">=</span> <span class="fu">guide_colourbar2</span><span class="op">(</span><span class="op">)</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_slab_fill_discrete</span><span class="op">(</span><span class="va">...</span>, aesthetics <span class="op">=</span> <span class="st">"slab_fill"</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_slab_fill_continuous</span><span class="op">(</span></span>
<span>  <span class="va">...</span>,</span>
<span>  aesthetics <span class="op">=</span> <span class="st">"slab_fill"</span>,</span>
<span>  guide <span class="op">=</span> <span class="fu">guide_colourbar2</span><span class="op">(</span><span class="op">)</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_slab_alpha_continuous</span><span class="op">(</span></span>
<span>  <span class="va">...</span>,</span>
<span>  limits <span class="op">=</span> <span class="kw">function</span><span class="op">(</span><span class="va">l</span><span class="op">)</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/Extremes.html" class="external-link">min</a></span><span class="op">(</span><span class="fl">0</span>, <span class="va">l</span><span class="op">[[</span><span class="fl">1</span><span class="op">]</span><span class="op">]</span><span class="op">)</span>, <span class="va">l</span><span class="op">[[</span><span class="fl">2</span><span class="op">]</span><span class="op">]</span><span class="op">)</span>,</span>
<span>  range <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">0</span>, <span class="fl">1</span><span class="op">)</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_slab_alpha_discrete</span><span class="op">(</span><span class="va">...</span>, range <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">0.1</span>, <span class="fl">1</span><span class="op">)</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_slab_size_continuous</span><span class="op">(</span><span class="va">...</span>, range <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">6</span><span class="op">)</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_slab_size_discrete</span><span class="op">(</span><span class="va">...</span>, range <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">6</span><span class="op">)</span>, na.translate <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_slab_linewidth_continuous</span><span class="op">(</span><span class="va">...</span>, range <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">6</span><span class="op">)</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_slab_linewidth_discrete</span><span class="op">(</span><span class="va">...</span>, range <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">6</span><span class="op">)</span>, na.translate <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_slab_linetype_discrete</span><span class="op">(</span><span class="va">...</span>, na.value <span class="op">=</span> <span class="st">"blank"</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_slab_linetype_continuous</span><span class="op">(</span><span class="va">...</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_slab_shape_discrete</span><span class="op">(</span><span class="va">...</span>, solid <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">scale_slab_shape_continuous</span><span class="op">(</span><span class="va">...</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">guide_colourbar2</span><span class="op">(</span><span class="va">...</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">guide_colorbar2</span><span class="op">(</span><span class="va">...</span><span class="op">)</span></span></code></pre></div>
    </div>

    <div class="section level2">
    <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
    <dl><dt>...</dt>
<dd><p>Arguments passed to underlying scale or guide functions. E.g. <code>scale_point_color_discrete</code>
passes arguments to <code><a href="https://ggplot2.tidyverse.org/reference/scale_colour_discrete.html" class="external-link">scale_color_discrete()</a></code>. See those functions for more details.</p></dd>


<dt>aesthetics</dt>
<dd><p>Names of aesthetics to set scales for.</p></dd>


<dt>guide</dt>
<dd><p>Guide to use for legends for an aesthetic.</p></dd>


<dt>range</dt>
<dd><p>a numeric vector of length 2 that specifies the minimum and maximum size of the plotting symbol
after transformation.</p></dd>


<dt>na.translate</dt>
<dd><p>In discrete scales, should we show missing values?</p></dd>


<dt>na.value</dt>
<dd><p>When <code>na.translate</code> is true, what value should be shown?</p></dd>


<dt>limits</dt>
<dd><p>One of:</p><ul><li><p><code>NULL</code> to use the default scale range</p></li>
<li><p>A numeric vector of length two providing limits of the scale.
Use <code>NA</code> to refer to the existing minimum or maximum</p></li>
<li><p>A function that accepts the existing (automatic) limits and returns
new limits. Also accepts rlang <a href="https://rlang.r-lib.org/reference/as_function.html" class="external-link">lambda</a> function
notation.
Note that setting limits on positional scales will <strong>remove</strong> data outside of the limits.
If the purpose is to zoom, use the limit argument in the coordinate system
(see <code><a href="https://ggplot2.tidyverse.org/reference/coord_cartesian.html" class="external-link">coord_cartesian()</a></code>).</p></li>
</ul></dd>


<dt>solid</dt>
<dd><p>Should the shapes be solid, <code>TRUE</code>, or hollow,
<code>FALSE</code>?</p></dd>

</dl></div>
    <div class="section level2">
    <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
    

<p>A <a href="https://ggplot2.tidyverse.org/reference/ggplot2-ggproto.html" class="external-link">ggplot2::Scale</a> representing one of the aesthetics used to target the appearance of specific parts of composite
<code>ggdist</code> geoms. Can be added to a <code><a href="https://ggplot2.tidyverse.org/reference/ggplot.html" class="external-link">ggplot()</a></code> object.</p>
    </div>
    <div class="section level2">
    <h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
    <p>The following additional scales / aesthetics are defined for use with <code><a href="geom_slabinterval.html">geom_slabinterval()</a></code> and
related geoms:</p>
<dl><dt><code>scale_point_color_* </code></dt>
<dd><p>Point color</p></dd>

<dt><code>scale_point_fill_* </code></dt>
<dd><p>Point fill color</p></dd>

<dt><code>scale_point_alpha_* </code></dt>
<dd><p>Point alpha level / opacity</p></dd>

<dt><code>scale_point_size_* </code></dt>
<dd><p>Point size</p></dd>

<dt><code>scale_interval_color_* </code></dt>
<dd><p>Interval line color</p></dd>

<dt><code>scale_interval_alpha_* </code></dt>
<dd><p>Interval alpha level / opacity</p></dd>

<dt><code>scale_interval_linetype_* </code></dt>
<dd><p>Interval line type</p></dd>

<dt><code>scale_slab_color_* </code></dt>
<dd><p>Slab outline color</p></dd>

<dt><code>scale_slab_fill_* </code></dt>
<dd><p>Slab fill color</p></dd>

<dt><code>scale_slab_alpha_* </code></dt>
<dd><p>Slab alpha level / opacity. The default settings of
<code>scale_slab_alpha_continuous</code> differ from <code><a href="https://ggplot2.tidyverse.org/reference/scale_alpha.html" class="external-link">scale_alpha_continuous()</a></code> and
are designed for gradient plots (e.g. <code><a href="stat_gradientinterval.html">stat_gradientinterval()</a></code>) by ensuring that
densities of 0 get mapped to 0 in the output.</p></dd>

<dt><code>scale_slab_linewidth_* </code></dt>
<dd><p>Slab outline line width</p></dd>

<dt><code>scale_slab_linetype_* </code></dt>
<dd><p>Slab outline line type</p></dd>

<dt><code>scale_slab_shape_* </code></dt>
<dd><p>Slab dot shape (for <code><a href="geom_dotsinterval.html">geom_dotsinterval()</a></code>)</p></dd>


</dl><p>See the corresponding scale documentation in ggplot for more information; e.g.
<code><a href="https://ggplot2.tidyverse.org/reference/scale_colour_discrete.html" class="external-link">scale_color_discrete()</a></code>, <code><a href="https://ggplot2.tidyverse.org/reference/scale_colour_continuous.html" class="external-link">scale_color_continuous()</a></code>, etc.</p>
<p>Other scale functions can be used with the aesthetics/scales defined here by using the <code>aesthetics</code>
argument to that scale function. For example, to use color brewer scales with the <code>point_color</code> aesthetic:</p>
<p><code>scale_color_brewer(..., aesthetics = "point_color")</code></p>
<p>With continuous color scales, you may also need to provide a guide as the default guide does not work properly;
this is what <code>guide_colorbar2</code> is for:</p>
<p><code>scale_color_distiller(..., guide = "colorbar2", aesthetics = "point_color")</code></p>
<p>These scales have been deprecated:</p>
<dl><dt><code>scale_interval_size_* </code></dt>
<dd><p>Use <code>scale_linewidth_*</code></p></dd>

<dt><code>scale_slab_size_* </code></dt>
<dd><p>Slab <code>scale_size_linewidth_*</code></p></dd>


</dl></div>
    <div class="section level2">
    <h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2>
    <div class="dont-index"><p>Other ggplot2 scales: <code><a href="https://ggplot2.tidyverse.org/reference/scale_colour_discrete.html" class="external-link">scale_color_discrete()</a></code>, <code><a href="https://ggplot2.tidyverse.org/reference/scale_colour_continuous.html" class="external-link">scale_color_continuous()</a></code>, etc.</p>
<p>Other ggdist scales: 
<code><a href="scale_colour_ramp.html">scale_colour_ramp</a></code>,
<code><a href="scale_side_mirrored.html">scale_side_mirrored</a>()</code>,
<code><a href="scale_thickness.html">scale_thickness</a></code></p></div>
    </div>
    <div class="section level2">
    <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2>
    <p>Matthew Kay</p>
    </div>

    <div class="section level2">
    <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
    <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span>
<span class="r-in"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://dplyr.tidyverse.org" class="external-link">dplyr</a></span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://ggplot2.tidyverse.org" class="external-link">ggplot2</a></span><span class="op">)</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># This plot shows how to set multiple specific aesthetics</span></span></span>
<span class="r-in"><span><span class="co"># NB it is very ugly and is only for demo purposes.</span></span></span>
<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a></span><span class="op">(</span>distribution <span class="op">=</span> <span class="st">"Normal(1,2)"</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>
<span class="r-in"><span>  <span class="fu"><a href="parse_dist.html">parse_dist</a></span><span class="op">(</span><span class="va">distribution</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>
<span class="r-in"><span>  <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html" class="external-link">ggplot</a></span><span class="op">(</span><span class="fu"><a href="https://ggplot2.tidyverse.org/reference/aes.html" class="external-link">aes</a></span><span class="op">(</span>y <span class="op">=</span> <span class="va">distribution</span>, xdist <span class="op">=</span> <span class="va">.dist</span>, args <span class="op">=</span> <span class="va">.args</span><span class="op">)</span><span class="op">)</span> <span class="op">+</span></span></span>
<span class="r-in"><span>  <span class="fu"><a href="stat_halfeye.html">stat_halfeye</a></span><span class="op">(</span></span></span>
<span class="r-in"><span>    shape <span class="op">=</span> <span class="fl">21</span>,  <span class="co"># this point shape has a fill and outline</span></span></span>
<span class="r-in"><span>    point_color <span class="op">=</span> <span class="st">"red"</span>,</span></span>
<span class="r-in"><span>    point_fill <span class="op">=</span> <span class="st">"black"</span>,</span></span>
<span class="r-in"><span>    point_alpha <span class="op">=</span> <span class="fl">.1</span>,</span></span>
<span class="r-in"><span>    point_size <span class="op">=</span> <span class="fl">6</span>,</span></span>
<span class="r-in"><span>    stroke <span class="op">=</span> <span class="fl">2</span>,</span></span>
<span class="r-in"><span>    interval_color <span class="op">=</span> <span class="st">"blue"</span>,</span></span>
<span class="r-in"><span>    <span class="co"># interval line widths are scaled from [1, 6] onto [0.6, 1.4] by default</span></span></span>
<span class="r-in"><span>    <span class="co"># see the interval_size_range parameter in help("geom_slabinterval")</span></span></span>
<span class="r-in"><span>    linewidth <span class="op">=</span> <span class="fl">8</span>,</span></span>
<span class="r-in"><span>    interval_linetype <span class="op">=</span> <span class="st">"dashed"</span>,</span></span>
<span class="r-in"><span>    interval_alpha <span class="op">=</span> <span class="fl">.25</span>,</span></span>
<span class="r-in"><span>    <span class="co"># fill sets the fill color of the slab (here the density)</span></span></span>
<span class="r-in"><span>    slab_color <span class="op">=</span> <span class="st">"green"</span>,</span></span>
<span class="r-in"><span>    slab_fill <span class="op">=</span> <span class="st">"purple"</span>,</span></span>
<span class="r-in"><span>    slab_linewidth <span class="op">=</span> <span class="fl">3</span>,</span></span>
<span class="r-in"><span>    slab_linetype <span class="op">=</span> <span class="st">"dotted"</span>,</span></span>
<span class="r-in"><span>    slab_alpha <span class="op">=</span> <span class="fl">.5</span></span></span>
<span class="r-in"><span>  <span class="op">)</span></span></span>
<span class="r-plt img"><img src="sub-geometry-scales-1.png" alt="" width="700" height="433"></span>
<span class="r-in"><span></span></span>
</code></pre></div>
    </div>
  </main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
    </nav></aside></div>


    <footer><div class="pkgdown-footer-left">
  <p></p><p>Developed by <a href="https://www.mjskay.com" class="external-link">Matthew Kay</a>.</p>
</div>

<div class="pkgdown-footer-right">
  <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>

    </footer></div>

  

  

  </body></html>

