Skip to content

aspect ratio of plot not working with of space = "free" in facet_grid  #3834

Closed
@dvaiman

Description

@dvaiman

Hi, in ggplot I want to set the aspect ratio of the plot to a certain number.
space = "free"in facet_grid does not seem to work with theme(aspect.ratio = 1). Is there a workaround for this. Also I use coord_flip which hinders the use of coord_fixed. This is what I get:

Rplot09

library(ggplot2)

ggplot(mtcars, aes(hp, mpg)) +
  geom_point(aes()) +
  coord_flip()+
  theme(aspect.ratio = 1)+
  facet_grid(vars(cyl), space = "free")

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions