yanlinlin82 / ggvenn

Venn Diagram by ggplot2, with really easy-to-use API.
Other
167 stars 25 forks source link

Annotate Venn diagram #19

Closed anuragnsharma closed 3 years ago

anuragnsharma commented 3 years ago

Apart from the standard venn diagram plot:

Fantastic package btw! This has been missing for a while for ggplot2.

yanlinlin82 commented 3 years ago

Hi @anuragnsharma ,

Thanks for your interest in ggvenn.

Since ggvenn is based on ggplot, it is easy to add separate labels:

library(ggvenn)
g <- list(A = 1:3, B = 2:5) %>% ggvenn()
g + geom_label(data = tibble(x = -1:1, y = -1, s = c("aaa", "bbb", "ccc")), aes(x, y, label = s))

or with ggrepel:

library(ggrepel)
g + geom_label_repel(data = tibble(x = 0, y = -1, s = c("aaa", "bbb", "ccc")), aes(x, y, label = s))

For the third question, the answer is yes. I am thinking about how to implement the scaling features, and maybe I will try it in the next two or three months.

For the last question, changing the font of set names and texts, so far there is no good way to customize them because I hard-coded that in ggvenn. I will consider this requirement in the future.

anuragnsharma commented 3 years ago

Great! Looking forward to the upcoming additions.