Hello everybody,
I got one question during making my plots using ggplot2.
siONE <- seqdata$ONE
siTWO <- seqdata$TWO
ggplot(data = seqdata, aes(x = siONE, y = siTWO, color = point, alpha = point, size = point)) +
geom_point(position = "jitter") +
lims(x = c(-1.5, 1.5), y = c(-1.5, 1.5)) +
#scale_x_continuous(breaks = c(-3.0, -2.0, -1.0, 0, 1.0, 2.0, 3.0)) +
scale_fill_gradient2(low = "white", high = "red", mid = "blue", midpoint = 1.5) +
annotate(geom = "segment", x = c(-Inf, 0), xend = c(Inf, 0), y = c(0, -Inf), yend = c(0, Inf), size = 0.6) +
coord_fixed(ratio = 1) +
theme(panel.background = element_rect(fill = "#f5f5f5")) +
scale_color_manual(values=c("dark gray", "#e41a1c", "#377eb8", "#4daf4a", "#984ea3")) +
scale_alpha_manual(values = c(0.08, 5, 5, 5, 5)) +
scale_size_manual(values = c(0.7, 1, 2, 2, 2)) +
theme(panel.grid.major.x = element_blank(),
panel.grid.minor.x = element_blank(),
panel.grid.major.y = element_blank(),
panel.grid.minor.y = element_blank())
I used the script for this graph.
In this graph, there are 387 missing values. But I want these 387 dots not to be omitted but to be placed on the rim of the graph like this one. (This is coming from Boehm et al. 2021 Nat Commun. There are dots placed in the upper limitation line instead omitted.)
I hope I could find how I can make it. Thank you very much!
Add another column contains factors of the categories (NA, True and False), then add a group to ggplot.