% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/set-blanket.R
\name{set_blanket}
\alias{set_blanket}
\title{Set ggblanket defaults}
\usage{
set_blanket(
  ...,
  theme = ggrefine::theme_grey(),
  refine = ggrefine::modern,
  fill = "#357BA2FF",
  fill_palette = list(jumble::jumble, viridis::turbo(n = 256)),
  fill_border = NULL,
  colour = fill,
  colour_palette = fill_palette,
  colour_border = NULL,
  linewidth = 0.66,
  linewidth_border = 0.33,
  shape = 21,
  shape_palette = scales::pal_manual(c(21, 24, 22, 23, 25)),
  linetype = 1,
  linetype_palette = scales::pal_manual(1:6),
  size = 1.5,
  stroke = 0.33,
  coord_clip = "off"
)
}
\arguments{
\item{...}{Not used. Forces named arguments.}

\item{theme}{A ggplot2 theme. Defaults to \code{\link[ggrefine:theme_grey]{ggrefine::theme_grey()}}.}

\item{refine}{A refine function. Defaults to \link[ggrefine:modern]{ggrefine::modern}.}

\item{fill}{Default fill colour. Defaults to \code{"#357BA2FF"}.}

\item{fill_palette}{Palette for fill scales. A single discrete palette or
\code{list(discrete, continuous)}. Defaults to
\code{list(jumble::jumble, viridis::turbo(n = 256))}.}

\item{fill_border}{When \code{border = TRUE}, a function applied to \code{fill} and
\code{fill_palette} to derive the fill. Defaults to \verb{\\(x) x}.}

\item{colour}{Default colour. Defaults to \code{fill}.}

\item{colour_palette}{Palette for colour scales. Same format as
\code{fill_palette}. Defaults to \code{fill_palette}.}

\item{colour_border}{When \code{border = TRUE}, a function applied to \code{fill} and
\code{fill_palette} to derive the colour. If \code{fill_border} is \code{NULL}, defaults
to \code{\link[blends:multiply]{blends::multiply()}} for light panels and \code{\link[blends:screen]{blends::screen()}} for dark
panels. Otherwise defaults to \verb{\\(x) x}.}

\item{linewidth}{Default linewidth. Defaults to \code{0.66}.}

\item{linewidth_border}{When \code{border = TRUE}, the default linewidth.
Defaults to \code{0.33}.}

\item{shape}{Default point shape. Defaults to \code{21}.}

\item{shape_palette}{Palette for shape scales. Defaults to
\code{scales::pal_manual(c(21, 24, 22, 23, 25))}.}

\item{linetype}{Default linetype. Defaults to \code{1}.}

\item{linetype_palette}{Palette for linetype scales. Defaults to
\code{scales::pal_manual(1:6)}.}

\item{size}{Default point size. Defaults to \code{1.5}.}

\item{stroke}{Default stroke for point geoms. Defaults to \code{0.33}.}

\item{coord_clip}{Whether drawing is clipped to the panel. Either \code{"on"} or \code{"off"} (default).}
}
\value{
Called for side effects.
}
\description{
Use \code{set_blanket} to:
\itemize{
\item Set a global theme via \code{\link[ggplot2:get_theme]{ggplot2::set_theme()}}
\item Set a global option for how themes are to be refined based on plot scale
types via \code{refine}
\item Update the global theme \code{fill}, \code{colour}, \code{linewidth}, \code{shape},
\code{linetype}, \code{size}, \code{stroke}
\item Update the global theme \code{fill_palette}, \code{colour_palette}, \code{shape_palette}
and \code{linetype_palette}
\item Set a global option for \code{colour_border}, which is a function to transform
the \code{colour} and \code{colour_palette} with input of the \code{fill} and
\code{fill_palette} respectively
\item Set a global option for \code{fill_border}, which is a function to transform
the \code{fill} and \code{fill_palette} with input of the \code{colour} and
\code{colour_palette} respectively.
\item Set a global option \code{coord_clip}.
}
}
\examples{
set_blanket(
  fill_palette = scales::pal_hue(),
)

palmerpenguins::penguins |>
  gg_density(
    x = flipper_length_mm,
    fill = species,
  )

set_blanket(
  fill_palette = scales::pal_hue(),
  fill_border = \(x) scales::alpha(x, 0.75),
)

palmerpenguins::penguins |>
  gg_density(
    x = flipper_length_mm,
    fill = species,
  )

}
\seealso{
\code{\link[scales:number_options]{scales::number_options()}}
}
