| gg_blanket | R Documentation | 
Create a blanket ggplot with a wrapper around ggplot2::ggplot() + layer() with geom_blank() defaults. This function underlies all other gg_* functions. It contains a geom argument for maximum flexibility.
gg_blanket(
  data = NULL,
  ...,
  geom = "blank",
  stat = "identity",
  position = "identity",
  coord = NULL,
  theme = NULL,
  theme_orientation = NULL,
  theme_axis_line_rm = NULL,
  theme_axis_ticks_rm = NULL,
  theme_panel_grid_rm = NULL,
  blend = NULL,
  x = NULL,
  xmin = NULL,
  xmax = NULL,
  xend = NULL,
  y = NULL,
  ymin = NULL,
  ymax = NULL,
  yend = NULL,
  z = NULL,
  col = NULL,
  facet = NULL,
  facet2 = NULL,
  group = NULL,
  subgroup = NULL,
  label = NULL,
  text = NULL,
  sample = NULL,
  mapping = NULL,
  x_breaks = NULL,
  x_breaks_n = NULL,
  x_expand = NULL,
  x_expand_limits = NULL,
  x_label = NULL,
  x_labels = NULL,
  x_position = "bottom",
  x_sec_axis = ggplot2::waiver(),
  x_symmetric = NULL,
  x_transform = NULL,
  y_breaks = NULL,
  y_breaks_n = NULL,
  y_expand = NULL,
  y_expand_limits = NULL,
  y_label = NULL,
  y_labels = NULL,
  y_position = "left",
  y_sec_axis = ggplot2::waiver(),
  y_symmetric = NULL,
  y_transform = NULL,
  col_breaks = NULL,
  col_breaks_n = 5,
  col_drop = FALSE,
  col_expand_limits = NULL,
  col_label = NULL,
  col_labels = NULL,
  col_legend_ncol = NULL,
  col_legend_nrow = NULL,
  col_legend_rev = FALSE,
  col_palette = NULL,
  col_palette_na = NULL,
  col_rescale = scales::rescale(),
  col_steps = FALSE,
  col_transform = NULL,
  facet_axes = NULL,
  facet_axis_labels = "margins",
  facet_drop = FALSE,
  facet_labels = NULL,
  facet_layout = NULL,
  facet_ncol = NULL,
  facet_nrow = NULL,
  facet_scales = "fixed",
  facet_space = "fixed",
  title = NULL,
  subtitle = NULL,
  caption = NULL,
  label_case = NULL
)
| data | A data frame or tibble. | 
| ... | Other arguments passed to within a  | 
| geom | A geometric object to display the data. A snakecase character string of a ggproto Geom subclass object minus the Geom prefix (e.g.  | 
| stat | A statistical transformation to use on the data. A snakecase character string of a ggproto Stat subclass object minus the Stat prefix (e.g.  | 
| position | A position adjustment. A snakecase character string of a ggproto Position subclass object minus the Position prefix (e.g.  | 
| coord | A coordinate system. A  | 
| theme | A ggplot2 theme (e.g.  | 
| theme_orientation | The orientation of plot, which affects the theme components that are removed. Either  | 
| theme_axis_line_rm | 
 | 
| theme_axis_ticks_rm | 
 | 
| theme_panel_grid_rm | 
 | 
| blend | The blending mode per  | 
| x,xmin,xmax,xend,y,ymin,ymax,yend,z,col,facet,facet2,group,subgroup,label,text,sample | An unquoted aesthetic variable. | 
| mapping | A set of additional aesthetic mappings in  | 
| x_breaks,y_breaks,col_breaks | A  | 
| x_breaks_n,y_breaks_n,col_breaks_n | A number of desired breaks for when  | 
| x_expand,y_expand | Padding to the limits with the  | 
| x_expand_limits,y_expand_limits,col_expand_limits | For a continuous variable, any values that the limits should encompass (e.g.  | 
| x_label,y_label,col_label | Label for the axis or legend title. Use  | 
| x_labels,y_labels,col_labels,facet_labels | A function that takes the breaks as inputs (e.g.  | 
| x_position,y_position | The position of the axis (i.e.  | 
| x_sec_axis,y_sec_axis | A secondary axis with  | 
| x_symmetric,y_symmetric | 
 | 
| x_transform,y_transform,col_transform | For a continuous scale, a transformation object (e.g.  | 
| col_drop,facet_drop | For a discrete variable, FALSE or TRUE of whether to drop unused levels. | 
| col_legend_ncol,col_legend_nrow | The number of columns and rows in a legend guide. | 
| col_legend_rev | 
 | 
| col_palette | A character vector of hex codes (or names) or a  | 
| col_palette_na | A hex code (or name) for the colour of  | 
| col_rescale | For a continuous variable, a  | 
| col_steps | For a continuous variable,  | 
| facet_axes | Whether to add interior axes and ticks with  | 
| facet_axis_labels | Whether to add interior axis labels with  | 
| facet_layout | Whether the layout is to be  | 
| facet_ncol,facet_nrow | The number of columns and rows of facet panels. Only applies to a facet layout of  | 
| facet_scales | Whether facet scales should be  | 
| facet_space | When the facet scales are not  | 
| title | Title string. | 
| subtitle | Subtitle string. | 
| caption | Caption title string. | 
| label_case | A function to format the label of unlabelled variables. Defaults to  | 
A ggplot object.
library(ggplot2)
library(dplyr)
library(palmerpenguins)
set_blanket()
penguins |>
  gg_blanket(
    geom = "violin",
    stat = "ydensity",
    position = "dodge",
    x = species,
    y = body_mass_g,
    col = sex,
  )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.