<!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.0">
<title>Customized Color Palettes &amp; Themes • scCustomize</title>
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script><!-- 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">
<!-- 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><!-- 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><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script><meta property="og:title" content="Customized Color Palettes &amp; Themes">
<meta property="og:description" content="scCustomize">
<!-- 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]-->
</head>
<body data-spy="scroll" data-target="#toc">
    

    <div class="container template-article">
      <header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <span class="navbar-brand">
        <a class="navbar-link" href="../index.html">scCustomize</a>
        <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">2.1.2</span>
      </span>
    </div>

    <div id="navbar" class="navbar-collapse collapse">
      <ul class="nav navbar-nav">
<li>
  <a href="../index.html">Getting Started</a>
</li>
<li>
  <a href="../articles/Installation.html">Install</a>
</li>
<li class="dropdown">
  <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
    Vignettes
     
    <span class="caret"></span>
  </a>
  <ul class="dropdown-menu" role="menu">
<li class="dropdown-header">Plotting Vignettes</li>
    <li>
      <a href="../articles/Gene_Expression_Plotting.html">Plotting #1: General Analysis Plots</a>
    </li>
    <li>
      <a href="../articles/QC_Plots.html">Plotting #2: QC Plots</a>
    </li>
    <li>
      <a href="../articles/Sequencing_QC_Plots.html">Plotting #3: Sequencing QC Plots/Analysis</a>
    </li>
    <li>
      <a href="../articles/Iterative_Plotting.html">Plotting #4: Iterative Plotting Functions</a>
    </li>
    <li>
      <a href="../articles/Color_Palettes.html">Customized Color Palettes &amp; Themes</a>
    </li>
    <li class="divider">
    </li>
<li class="dropdown-header">Helpers &amp; Utilities</li>
    <li>
      <a href="../articles/Helpers_and_Utilities.html">General Helpers &amp; Utilities</a>
    </li>
    <li>
      <a href="../articles/Read_and_Write_Functions.html">Read &amp; Write Data Functions</a>
    </li>
    <li>
      <a href="../articles/Object_Conversion.html">Object/Assay Format Conversion</a>
    </li>
    <li>
      <a href="../articles/Markers_and_Cluster_Annotation.html">Marker Identification &amp; Cluster Annotation Helpers</a>
    </li>
    <li>
      <a href="../articles/Statistics.html">Statistics Functions</a>
    </li>
    <li>
      <a href="../articles/Update_Gene_Symbols.html">Updating Gene Symbols</a>
    </li>
    <li>
      <a href="../articles/Misc_Functions.html">Misc Functions</a>
    </li>
    <li class="divider">
    </li>
<li class="dropdown-header">Other Package Interactivity/Functions</li>
    <li>
      <a href="../articles/LIGER_Functions.html">LIGER Plotting &amp; Functionality</a>
    </li>
    <li>
      <a href="../articles/Cell_Bender_Functions.html">Cell Bender Functionality &amp; Plotting</a>
    </li>
  </ul>
</li>
<li>
  <a href="../news/index.html">News/Changelog</a>
</li>
<li>
  <a href="../reference/index.html">Reference</a>
</li>
<li>
  <a href="../articles/FAQ.html">FAQ</a>
</li>
      </ul>
<ul class="nav navbar-nav navbar-right">
<li>
  <a href="https://github.com/samuel-marsh/scCustomize/" class="external-link">
    <span class="fab fa-github fa-lg"></span>
     
  </a>
</li>
      </ul>
</div>
<!--/.nav-collapse -->
  </div>
<!--/.container -->
</div>
<!--/.navbar -->

      

      </header><div class="row">
  <div class="col-md-9 contents">
    <div class="page-header toc-ignore">
      <h1 data-toc-skip>Customized Color Palettes &amp; Themes</h1>
            
            <h4 data-toc-skip class="date">Compiled: February 28,
2024</h4>
      
      <small class="dont-index">Source: <a href="https://github.com/samuel-marsh/scCustomize/blob/HEAD/vignettes/articles/Color_Palettes.Rmd" class="external-link"><code>vignettes/articles/Color_Palettes.Rmd</code></a></small>
      <div class="hidden name"><code>Color_Palettes.Rmd</code></div>

    </div>

    
    
<hr>
<style>
p.caption {
  font-size: 0.9em;
}
</style>
<div class="section level2">
<h2 id="choosing-color-palettes-and-themes">Choosing Color Palettes and Themes<a class="anchor" aria-label="anchor" href="#choosing-color-palettes-and-themes"></a>
</h2>
<p>While the default Seurat and ggplot2 plots work well they can often
be enhanced by customizing color palettes and themeing options used. To
simplify/streamline this process for end users scCustomize:</p>
<p><strong>1. Sets default discrete and continuous variables that are
consistent across the package and are customized to plotting
conditions.</strong><br><strong>2. Contains a number of shortcuts or helper functions for quick
access to color palettes and themes that are frequently
used.</strong></p>
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="co"># Load Packages</span></span>
<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="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="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://magrittr.tidyverse.org" class="external-link">magrittr</a></span><span class="op">)</span></span>
<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://patchwork.data-imaginist.com" class="external-link">patchwork</a></span><span class="op">)</span></span>
<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://github.com/samuel-marsh/scCustomize" class="external-link">scCustomize</a></span><span class="op">)</span></span>
<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://github.com/traversc/qs" class="external-link">qs</a></span><span class="op">)</span></span>
<span></span>
<span><span class="co"># Load Marsh et al., 2022 datasets</span></span>
<span><span class="va">marsh_mouse_micro</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/pkg/qs/man/qread.html" class="external-link">qread</a></span><span class="op">(</span>file <span class="op">=</span> <span class="st">"assets/marsh_2020_micro.qs"</span><span class="op">)</span></span>
<span></span>
<span><span class="co"># Load PBMC example dataset</span></span>
<span><span class="va">pbmc</span> <span class="op">&lt;-</span> <span class="fu">pbmc3k.SeuratData</span><span class="fu">::</span><span class="va"><a href="https://rdrr.io/pkg/pbmc3k.SeuratData/man/pbmc3k.final.html" class="external-link">pbmc3k.final</a></span></span></code></pre></div>
</div>
<div class="section level2">
<h2 id="package-default-palettes">Package Default Palettes<a class="anchor" aria-label="anchor" href="#package-default-palettes"></a>
</h2>
<div class="section level3">
<h3 id="plotting-continuous-variables">Plotting Continuous Variables<a class="anchor" aria-label="anchor" href="#plotting-continuous-variables"></a>
</h3>
<p>The continuous palettes from the <a href="https://sjmgarnier.github.io/viridis/" class="external-link">viridis package</a> improve
plot readability and are more colorblind friendly than some commonly
used continuous palettes. When plotting continuous variables (e.g., gene
expression) scCustomize uses the reverse “plasma” palette by
default.</p>
<p><img src="Color_Palettes_files/figure-html/unnamed-chunk-3-1.png" width="1056"></p>
<div class="figure" style="text-align: center">
<img src="Color_Palettes_files/figure-html/unnamed-chunk-4-1.png" alt="*These palettes provided better contrast for continuous palettes.
 In scCustomize the default is `viridis_plasma_dark_high`*" width="960"><p class="caption">
<em>These palettes provided better contrast for continuous palettes. In
scCustomize the default is <code>viridis_plasma_dark_high</code></em>
</p>
</div>
<p>There is one exception to this in that
<code><a href="../reference/Plot_Density_Custom.html">Plot_Density_Custom()</a></code> and <code>Plot_Density_Joint()</code>
use the “magma” palette by default. This choice was made as I believe
that the magma palette provides better color scale for these plots.</p>
<div class="figure" style="text-align: center">
<img src="Color_Palettes_files/figure-html/unnamed-chunk-5-1.png" alt="*Example comparing **A.** default `Plot_Density_Custom` which uses 'magma' palette vs. **B.** plot using the 'plasma' palette.*" width="1248"><p class="caption">
<em>Example comparing <strong>A.</strong> default
<code>Plot_Density_Custom</code> which uses ‘magma’ palette
vs. <strong>B.</strong> plot using the ‘plasma’ palette.</em>
</p>
</div>
</div>
<div class="section level3">
<h3 id="plotting-discrete-variables">Plotting Discrete Variables<a class="anchor" aria-label="anchor" href="#plotting-discrete-variables"></a>
</h3>
<p>To provide better visualizations using default parameters scCustomize
sets a series of defaults for plots with discrete palettes using
<code><a href="../reference/scCustomize_Palette.html">scCustomize_Palette()</a></code> function.</p>
<ul>
<li>If only <strong>one identity</strong> is being plotted will use:
“dodgerblue”.</li>
<li>If only <em>two identities</em> are being plotted will use:
<code><a href="../reference/NavyAndOrange.html">NavyAndOrange()</a></code>
</li>
<li>If between 2 and 8 identities are being plotted will use
<code>ColorBlind_Pal</code>.</li>
<li>If greater than 2 identities but less than or equal to 36 will use:
<code>DiscretePalette_scCustomize(num_colors = 36, palette = "polychrome")</code>
</li>
<li>If greater than 36 identities will use dynamic varibow palette:
<code>DiscretePalette_scCustomize(num_colors = *Number of identities*, palette = "varibow", shuffle_pal = TRUE)</code>
</li>
</ul>
<p><img src="Color_Palettes_files/figure-html/unnamed-chunk-6-1.png" width="1056"><img src="Color_Palettes_files/figure-html/unnamed-chunk-6-2.png" width="1056"><img src="Color_Palettes_files/figure-html/unnamed-chunk-6-3.png" width="1056"><img src="Color_Palettes_files/figure-html/unnamed-chunk-6-4.png" width="1056"><img src="Color_Palettes_files/figure-html/unnamed-chunk-6-5.png" width="1056"></p>
</div>
</div>
<div class="section level2">
<h2 id="helper-functions-shortcuts">Helper Functions &amp; Shortcuts<a class="anchor" aria-label="anchor" href="#helper-functions-shortcuts"></a>
</h2>
</div>
<div class="section level2">
<h2 id="continuous-palettes">Continuous Palettes<a class="anchor" aria-label="anchor" href="#continuous-palettes"></a>
</h2>
<p>scCustomize has a number of quick helpers for access to palettes from
viridis package. For more information on viridis palettes. These can be
supplied to any appropriate plotting function in scCustomize or any
other plot in R.</p>
<ul>
<li>viridis_plasma_dark_high</li>
<li>viridis_plasma_light_high</li>
<li>viridis_magma_dark_high</li>
<li>viridis_magma_light_high</li>
<li>viridis_inferno_dark_high</li>
<li>viridis_inferno_light_high</li>
<li>viridis_dark_high</li>
<li>viridis_light_high</li>
</ul>
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">p1</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/FeaturePlot_scCustom.html">FeaturePlot_scCustom</a></span><span class="op">(</span>seurat_object <span class="op">=</span> <span class="va">pbmc</span>, features <span class="op">=</span> <span class="st">"CD3E"</span><span class="op">)</span></span>
<span><span class="va">p2</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/FeaturePlot_scCustom.html">FeaturePlot_scCustom</a></span><span class="op">(</span>seurat_object <span class="op">=</span> <span class="va">pbmc</span>, colors_use <span class="op">=</span> <span class="va">viridis_magma_dark_high</span>, features <span class="op">=</span> <span class="st">"CD3E"</span><span class="op">)</span></span>
<span><span class="va">p3</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/FeaturePlot_scCustom.html">FeaturePlot_scCustom</a></span><span class="op">(</span>seurat_object <span class="op">=</span> <span class="va">pbmc</span>, colors_use <span class="op">=</span> <span class="va">viridis_inferno_dark_high</span>, features <span class="op">=</span> <span class="st">"CD3E"</span><span class="op">)</span></span>
<span><span class="va">p4</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/FeaturePlot_scCustom.html">FeaturePlot_scCustom</a></span><span class="op">(</span>seurat_object <span class="op">=</span> <span class="va">pbmc</span>, colors_use <span class="op">=</span> <span class="va">viridis_light_high</span>, features <span class="op">=</span> <span class="st">"CD3E"</span><span class="op">)</span></span></code></pre></div>
<div class="figure" style="text-align: center">
<img src="Color_Palettes_files/figure-html/unnamed-chunk-8-1.png" alt="*These palettes provided better contrast for continuous palettes.
 In scCustomize the default is `viridis_plasma_dark_high`*" width="960"><p class="caption">
<em>These palettes provided better contrast for continuous palettes. In
scCustomize the default is <code>viridis_plasma_dark_high</code></em>
</p>
</div>
</div>
<div class="section level2">
<h2 id="large-discrete-palettes">Large Discrete Palettes<a class="anchor" aria-label="anchor" href="#large-discrete-palettes"></a>
</h2>
<div class="section level3">
<h3 id="discretepalette_sccustomize">
<code>DiscretePalette_scCustomize()</code><a class="anchor" aria-label="anchor" href="#discretepalette_sccustomize"></a>
</h3>
<p>The function <code>DiscretePalette_scCustomize</code> is function
inspired and modified from <code><a href="https://satijalab.org/seurat/reference/DiscretePalette.html" class="external-link">Seurat::DiscretePalette()</a></code>. Under
the hood most of the palettes are called using <a href="https://github.com/EmilHvitfeldt/paletteer" class="external-link">paletteer package</a>
to call palettes without adding package dependencies. The following
palettes can be specified:</p>
<ul>
<li>alphabet (24)</li>
<li>alphabet2 (24)</li>
<li>glasbey (32)</li>
<li>polychrome (36)</li>
<li>stepped (24)</li>
<li>ditto_seq (40)</li>
<li>varibow (Dynamic)</li>
</ul>
</div>
<div class="section level3">
<h3 id="palettes-can-either-be-saved-to-global-environment-as-variable-or-called-directly-within-other-functions">Palettes can either be saved to global environment as variable or
called directly within other functions:<a class="anchor" aria-label="anchor" href="#palettes-can-either-be-saved-to-global-environment-as-variable-or-called-directly-within-other-functions"></a>
</h3>
<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="co"># Save as variable to global environment</span></span>
<span><span class="va">polychrome_pal</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/DiscretePalette_scCustomize.html">DiscretePalette_scCustomize</a></span><span class="op">(</span>num_colors <span class="op">=</span> <span class="fl">36</span>, palette <span class="op">=</span> <span class="st">"polychrome"</span><span class="op">)</span></span>
<span></span>
<span><span class="co"># Call within another function</span></span>
<span><span class="fu"><a href="../reference/DimPlot_scCustom.html">DimPlot_scCustom</a></span><span class="op">(</span>seurat_object <span class="op">=</span> <span class="va">obj_name</span>, colors_use <span class="op">=</span> <span class="fu"><a href="../reference/DiscretePalette_scCustomize.html">DiscretePalette_scCustomize</a></span><span class="op">(</span>num_colors <span class="op">=</span> <span class="fl">26</span>,</span>
<span>    palette <span class="op">=</span> <span class="st">"polychrome"</span><span class="op">)</span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level3">
<h3 id="the-polychrome-palette-is-the-new-default-for-plots-with-36-levels-and-varibow-when-more-than-36-levels">The “polychrome” palette is the new default for plots with &lt;36
levels and “varibow” when more than 36 levels<a class="anchor" aria-label="anchor" href="#the-polychrome-palette-is-the-new-default-for-plots-with-36-levels-and-varibow-when-more-than-36-levels"></a>
</h3>
<div class="sourceCode" id="cb4"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="../reference/DimPlot_scCustom.html">DimPlot_scCustom</a></span><span class="op">(</span>seurat_object <span class="op">=</span> <span class="va">pbmc</span><span class="op">)</span></span></code></pre></div>
<p><img src="Color_Palettes_files/figure-html/unnamed-chunk-10-1.png" width="700" style="display: block; margin: auto;"></p>
</div>
<div class="section level3">
<h3 id="visualize-palettes">Visualize Palettes<a class="anchor" aria-label="anchor" href="#visualize-palettes"></a>
</h3>
<p>To visualize these or any other palette you can use the
<code><a href="../reference/PalettePlot.html">PalettePlot()</a></code> function.</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb5-1"><a href="#cb5-1" tabindex="-1"></a><span class="fu">PalettePlot</span>(<span class="at">pal =</span> <span class="fu">DiscretePalette_scCustomize</span>(<span class="at">num_colors =</span> <span class="dv">26</span>, <span class="at">palette =</span> <span class="st">"alphabet"</span>))</span>
<span id="cb5-2"><a href="#cb5-2" tabindex="-1"></a></span>
<span id="cb5-3"><a href="#cb5-3" tabindex="-1"></a><span class="fu">PalettePlot</span>(<span class="at">pal =</span> <span class="fu">c</span>(<span class="st">"color1"</span>, <span class="st">"color2"</span>, ...)</span></code></pre></div>
<p><img src="Color_Palettes_files/figure-html/unnamed-chunk-12-1.png" width="1056"><img src="Color_Palettes_files/figure-html/unnamed-chunk-12-2.png" width="1056"><img src="Color_Palettes_files/figure-html/unnamed-chunk-12-3.png" width="1056"><img src="Color_Palettes_files/figure-html/unnamed-chunk-12-4.png" width="1056"><img src="Color_Palettes_files/figure-html/unnamed-chunk-12-5.png" width="1056"><img src="Color_Palettes_files/figure-html/unnamed-chunk-12-6.png" width="1056"><img src="Color_Palettes_files/figure-html/unnamed-chunk-12-7.png" width="1056"></p>
</div>
<div class="section level3">
<h3 id="dynamic-palettes">Dynamic Palettes<a class="anchor" aria-label="anchor" href="#dynamic-palettes"></a>
</h3>
<p>Among the discrete palettes provide the “varibow” palette is actually
a dynamic palette whose colors will adjust across the rainbow according
to <code>num_colors</code> provided:
<img src="Color_Palettes_files/figure-html/unnamed-chunk-13-1.png" width="1056"><img src="Color_Palettes_files/figure-html/unnamed-chunk-13-2.png" width="1056"><img src="Color_Palettes_files/figure-html/unnamed-chunk-13-3.png" width="1056"><img src="Color_Palettes_files/figure-html/unnamed-chunk-13-4.png" width="1056"></p>
</div>
<div class="section level3">
<h3 id="shuffle-palettes">Shuffle Palettes<a class="anchor" aria-label="anchor" href="#shuffle-palettes"></a>
</h3>
<p>Sometimes it can be helpful to use different order for the discrete
palettes depending on the end plot generated (This can be especially
true with “varibow” sometimes). <code>DiscretePalette_scCustomize</code>
has optional parameter that will randomly shuffle the returned palette
(see <code>shuffle_pal</code> and <code>seed</code> parameter to allow
for reproducible shuffling.)</p>
<div class="sourceCode" id="cb6"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="../reference/PalettePlot.html">PalettePlot</a></span><span class="op">(</span>pal <span class="op">=</span> <span class="fu"><a href="../reference/DiscretePalette_scCustomize.html">DiscretePalette_scCustomize</a></span><span class="op">(</span>num_colors <span class="op">=</span> <span class="fl">30</span>, palette <span class="op">=</span> <span class="st">"varibow"</span><span class="op">)</span><span class="op">)</span> <span class="op">+</span> <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/labs.html" class="external-link">ggtitle</a></span><span class="op">(</span><span class="st">"varibow (normal)"</span><span class="op">)</span></span>
<span><span class="fu"><a href="../reference/PalettePlot.html">PalettePlot</a></span><span class="op">(</span>pal <span class="op">=</span> <span class="fu"><a href="../reference/DiscretePalette_scCustomize.html">DiscretePalette_scCustomize</a></span><span class="op">(</span>num_colors <span class="op">=</span> <span class="fl">30</span>, palette <span class="op">=</span> <span class="st">"varibow"</span><span class="op">)</span>, shuffle_pal <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span> <span class="op">+</span></span>
<span>    <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/labs.html" class="external-link">ggtitle</a></span><span class="op">(</span><span class="st">"varibow (shuffled)"</span><span class="op">)</span></span></code></pre></div>
<p><img src="Color_Palettes_files/figure-html/unnamed-chunk-15-1.png" width="1056"><img src="Color_Palettes_files/figure-html/unnamed-chunk-15-2.png" width="1056"></p>
</div>
</div>
<div class="section level2">
<h2 id="small-discrete-palettes">Small Discrete Palettes<a class="anchor" aria-label="anchor" href="#small-discrete-palettes"></a>
</h2>
<p>Finally scCustomize contains shortcuts for some shorter discrete
palettes that can be useful for plotting groups, treatments, genotypes,
etc.
<img src="Color_Palettes_files/figure-html/unnamed-chunk-16-1.png" width="1056"><img src="Color_Palettes_files/figure-html/unnamed-chunk-16-2.png" width="1056"><img src="Color_Palettes_files/figure-html/unnamed-chunk-16-3.png" width="1056"><img src="Color_Palettes_files/figure-html/unnamed-chunk-16-4.png" width="1056"></p>
</div>
<div class="section level2">
<h2 id="themes-plot-helpers">Themes &amp; Plot Helpers<a class="anchor" aria-label="anchor" href="#themes-plot-helpers"></a>
</h2>
<p>ggplot2 themeing works absolutely great but can also be simplified by
wrapping commonly used post-plot themes into less verbose functions.</p>
<p>scCustomize contains a few customized themes and ggplot2 helpers that
simplify post plot themeing/alterations.<br><em>NOTE: These functions can be used with any ggplot2 plot and are not
limited to modifying scCustomize plots.</em></p>
<ul>
<li>
<code><a href="../reference/UnRotate_X.html">UnRotate_X()</a></code> Undo x-axis label rotation</li>
<li>
<code><a href="../reference/Move_Legend.html">Move_Legend()</a></code> Select new location to move legend</li>
<li>
<code><a href="../reference/Blank_Theme.html">Blank_Theme()</a></code> Removes all axis labels and axes from
plot</li>
<li>
<code><a href="../reference/theme_ggprism_mod.html">theme_ggprism_mod()</a></code> Modified version of
<code><a href="https://csdaw.github.io/ggprism/reference/theme_prism.html" class="external-link">ggprism::theme_prism()</a></code>
</li>
</ul>
</div>
<div class="section level2">
<h2 id="suggestionsenhancements">Suggestions/Enhancements?<a class="anchor" aria-label="anchor" href="#suggestionsenhancements"></a>
</h2>
<p>If you have any ideas for additional color palettes that would be
helpful to add or ggplot2 themeing functions please post as <a href="https://github.com/samuel-marsh/scCustomize/pulls" class="external-link">Pull
Request</a> on GitHub!</p>
</div>
  </div>

  <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">

        <nav id="toc" data-toggle="toc"><h2 data-toc-skip>Contents</h2>
    </nav>
</div>

</div>



      <footer><div class="copyright">
  <p></p>
<p>Developed by Samuel Marsh.</p>
</div>

<div class="pkgdown">
  <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>
