Skip to content

feature request: build_instructions() to work with a ggplot object #25

@gsimchoni

Description

@gsimchoni

Hey,

This is the coolest package in the world. Could we have build_instructions() work with a ggplot object? (And maybe other useful functions only working with brickr_obj)

Currently it crushes somewhere when trying to figure out the object type:

df <- data.frame(trt = c("a", "b", "c"), outcome = c(2.3, 1.9, 3.2))

ggplot(df, aes(trt, outcome)) +
  geom_brick_col(aes(fill = trt)) +
  scale_fill_brick() +
  coord_brick() +
  theme_brick() -> p

build_instructions(p)

# Error in if (type == "mosaic") { : argument is of length zero

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