theme_inset: Make a ggplot2 inset theme.

theme_insetR Documentation

Make a ggplot2 inset theme.

Description

theme_inset is a ggplot2 theme geared towards making inset plots.

Usage

theme_inset(base_size = 12)

Arguments

base_size

base size, not used.

Value

a ggplot2 theme (i.e., a list of class options).

Author(s)

David Kahle david@kahle.io

Examples

library(ggplot2)
## Not run: 


n <- 50
df <- expand.grid(x = 1:n,y = 1:n)[sample(n^2,.5*n^2),]
qplot(x, y, data = df, geom = 'tile')
qplot(x, y, data = df, geom = 'tile') + theme_nothing()

qplot(1:10, 1:10) +
  annotation_custom(
    grob = ggplotGrob(qplot(1:10,1:10)),
    8, Inf, -Inf, 2
  )

qplot(1:10, 1:10) +
  annotation_custom(
    grob = ggplotGrob(qplot(1:10,1:10) + theme_nothing()),
    8, Inf, -Inf, 2
  )

qplot(1:10, 1:10) +
  annotation_custom(
    grob = ggplotGrob(qplot(1:10,1:10) + theme_inset()),
    8, Inf, -Inf, 2
  )


## End(Not run)


dkahle/ggmap documentation built on March 3, 2024, 8:19 a.m.