Skip to content

Adding reference boxes screws up scale limits #7

@cwickham

Description

@cwickham

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions