Skip to content

Custom x axis labels #11

Description

@cmndrsn

Currently manually defining x-axis labels is a somewhat arbitrary and unwieldy process. I plan to simplify this in a future commit for more flexible plotting

# Adding manual labels to unstacked plot
p <- ggcommonality::ggcommonality(mpg ~ hp + wt, data = mtcars)
plot(p)+
  scale_x_continuous(breaks = c(2, 3, 4), labels = c("Horse Power", "Weight", "Horse Power and Weight"))

# Adding manual labels to stacked plot
p <- ggcommonality::ggcommonality(mpg ~ hp + wt, data = mtcars, stack = TRUE)
plot(p)+
  scale_x_continuous(breaks = c(3, 4.5), labels = c("Common", "Unique"))
# Plotting unique effects before common effects
plot(p)+
  scale_x_reverse(breaks = c(3, 4.5), labels = c("Common", "Unique"))

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