-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
1. {ggpointless}
Code
library(ggpointless)
cols <- c("#f4ae1b", "#d77e7b", "#a84dbd", "#311dfc")
df2 <- data.frame(
key = c("A", "B", "B", "C", "D"),
x = c(0, 1, 6, 5, 6),
xend = c(5, 4, 10, 8, 10)
)
ggplot(df2, aes(x = x, xend = xend, color = key, fill = key)) +
geom_lexis(aes(linetype = after_stat(type)), size = 2.5, shape = 21, linewidth = 1.1) +
coord_equal() +
scale_x_continuous(breaks = c(df2$x, df2$xend)) +
scale_color_manual(values = cols) +
scale_linetype_identity() +
ggthemes::theme_fivethirtyeight(base_size = 10) +
labs(title = NULL, x = NULL) +
theme(
legend.position = "none",
axis.text.x = element_text(size = 12, face = "bold"),
axis.text.y = element_text(size = 12, face = "bold"),
panel.grid.minor = element_blank()
)
Created on 2024-06-06 with reprex v2.1.0
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation