Skip to content

Understanding Facets #36

Description

@duttashi

Let's say, you want to do split up your data by one or more variables and plot the subsets of data together. This can be achieved by facetting or facet. A minimum reproducible example is given below;

library(ggplot2)
mpg_data <- as.data.frame(mpg)

ggplot(data = mpg_data[1:10,], aes(x = cty, y = cyl)) + 
  geom_point()+
  facet_wrap(~model)

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions