Skip to content

geom_rug and coord_flip do not work together #2987

Closed
@has2k1

Description

@has2k1
library(ggplot2)

df <- data.frame(x=1:10, y=(1:10)^3)
g <- ggplot(df, aes(x, y)) + geom_point() + geom_rug(sides='l')

# Normal plot
g

# coord_flip does not flip the rugs
g + coord_flip()

Created on 2018-11-08 by the reprex package (v0.2.1)

Problem

The location of the rugs is contained in the sides parameter of geom_rug. The parameters of a geom are not passed to the coordinate system and so it cannot manipulate them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions