labeled_contour: Contour w/ Labels

Description Usage Arguments See Also Examples

Description

geom_contour() + labels

Usage

1
2
3
4
5
6
7
8
9
StatContourLabel

geom_contour_label(mapping = NULL, data = NULL, position = "identity",
  na.rm = FALSE, show.legend = NA, inherit.aes = TRUE, digits = 3, ...)

geom_labeled_contour(mapping = NULL, data = NULL, stat = "contour",
  position = "identity", lineend = "butt", linejoin = "round",
  linemitre = 1, na.rm = FALSE, show.legend = NA, inherit.aes = TRUE,
  digits = 3, ...)

Arguments

digits

this parameter is passed to signif(), but usually this doesn't matter since the levels of contours are rounded already

See Also

The arguments are the same as geom_contour, except for digits

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
library(ggplot2)
N <- 60
x <- seq(0, 100, length=N)
d.cont <- data.frame(x=rep(x,N), y=rep(x,each=N))
d.cont <- transform(d.cont, z.diff = x-y)

ggplot(d.cont, aes(x, y, z = z.diff)) +
  geom_contour() +
  geom_contour_label()

# shortcut
ggplot(d.cont, aes(x, y, z = z.diff)) +
  geom_labeled_contour()

yutannihilation/gglabeledcontour documentation built on May 4, 2019, 7:45 p.m.