ggzoom: Zoom in on ggplots

Description Usage Arguments Value Examples

Description

Zoom in on a ggplot object by dragging a selection with the mouse.

Usage

1
ggzoom(plotExpr)

Arguments

plotExpr

A ggplot2 plot object

Value

The final zoom bounds (or NULL if unzoomed)

Examples

1
2
3
4
5
6
7
library(ggplot2)
p <- ggplot(cars, aes(speed, dist)) + geom_point()
ggzoom(p)

# Also works for one-dimensional visualizations
p2 <- ggplot(cars, aes(dist)) + geom_histogram()
gzoom(p2)

jcheng5/ggutils documentation built on May 18, 2019, 10:22 p.m.