Skip to content

How to drop unused categories in x axis? #32

@msgoussi

Description

@msgoussi

library(ggplot2)
library(lemon)
df <- data.frame(
v1 = c("A", "A", "A", "B", "B", "B"),
v2 = c("S1", "S2", "S3", "S7", "S8", "S9"),
nm = c(2, 3, 4, 5, 6, 7)
)

ggplot(df, aes(x = v2, y = nm)) +
geom_point(size = 3) +
facet_rep_grid(v1~., scales = "free_x", repeat.tick.labels = T)

image

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