Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set names not shown fully #25

Open
AidenSb opened this issue Dec 8, 2021 · 3 comments
Open

Set names not shown fully #25

AidenSb opened this issue Dec 8, 2021 · 3 comments

Comments

@AidenSb
Copy link

AidenSb commented Dec 8, 2021

Hi,
Thanks for the beautiful package.
Any ideas on how can I adjust the position of the set names? for longer set names it doesn't show them fully no matter the plot size. (e.g test1test2test3test4 in this example)
Thanks

image

@MVesuviusC
Copy link

MVesuviusC commented Jan 30, 2023

Hey, I found a work-around for this:

venn_plot <- ggvenn::ggvenn(list_of_four_vectors)

venn_plot$layers[[3]]$data$x <- c(-1, -0.8, 0.8, 1)

Adjust the numeric vector to push things where you want
You may need to use fewer/different positions if you have less than a four-way Venn diagram. You can just run venn_plot$layers[[3]]$data$x to get an idea of the current label positions

@zxgsy520
Copy link

image
Save using ggsave. The name display is incomplete. May I ask how to handle it. Thank you!

@yanlinlin82
Copy link
Owner

Thank you for asking!

So far, a workaround for this problem is manually setting the coordinates boundary. Here goes an example:

library(ggvenn)

a = list('a very very long set name' = 1:5, 'another set' = 4:7)
ggvenn(a) + coord_cartesian(xlim = c(-5, 5), ylim = c(-5, 5))  # modify these numbers to refine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants