df1 <- data.frame(x = c(0, 1), xend = c(2, 3), grp = c("A", "B"))
ggplot(df1, aes(x, xend = xend, color = grp)) +
geom_lexis()
# the glyph can be changed using the `key_glyph` argument
ggplot(mtcars, aes(wt, mpg, color = "red")) +
geom_point(key_glyph = "lexis")
Run the code above in your browser using DataLab