Powered by AppSignal & Oban Pro

Blank layers: geom_blank

notebooks/geom_blank.livemd

Blank layers: geom_blank

Mix.install([
  {:giggly, path: Path.join(__DIR__, "..")},
  {:kino, "~> 0.19"}
  ])

About this notebook

This notebook follows the examples on ggplot2's reference page for geom_blank(), in the order the page gives them. Each example shows ggplot2's code first and then Giggly's. An example Giggly cannot draw yet keeps its ggplot2 code and names what it is waiting for, so the page is also a list of what remains.

geom_blank() draws nothing, but its data still sets the plot's scales, which makes it a way of giving several plots the same scales; the page points to expand_limits() for more. Giggly has no geom_blank() yet.

A plot with no layers

ggplot(mtcars, aes(wt, mpg))
# Nothing to see here!

ggplot2 draws a plot with no layers as though it had a geom_blank() layer: no marks, but axes that span wt and mpg and are titled by them. Not in Giggly yet: geom_blank().