ggsubplot icon indicating copy to clipboard operation
ggsubplot copied to clipboard

Adding reference boxes screws up scale limits

Open cwickham opened this issue 12 years ago • 0 comments

Here's an example

n <- 10
df <- data.frame(y = rnorm(4*n), 
  group = rep(letters[1:4], each = n),
  long = rep(c(-120,  -80, -110, -70), each =  n),
  lat = rep(c(45, 30), each =  2*n))

ggplot(df, aes(long, lat)) +
  geom_subplot(aes(long, lat, group = group,
    subplot = geom_histogram(aes(y, ..count..))))

# now try to add reference boxes
ggplot(df, aes(long, lat)) +
  geom_subplot(aes(long, lat, group = group,
    subplot = geom_histogram(aes(y, ..count..))), ref = ref_box())
# scale limits are way too big!

cwickham avatar Apr 23 '13 21:04 cwickham