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

Could the function adjust the distance between the setname and the circle? #40

Open
SSSJe opened this issue Jan 16, 2024 · 3 comments
Open

Comments

@SSSJe
Copy link

SSSJe commented Jan 16, 2024

I used the function:
ggvenn(venn_list, fill_color = c("#1F77B4FF", "#FF7F0EFF"), fill_alpha = .7, stroke_size = 0.3, stroke_alpha = .5, show_percentage = FALSE, text_size = 8, set_name_size = 6) + labs(title = 'TNK') + theme(plot.title = element_text(size=18, face="bold", hjust=0.5))
The output is like this:
image
I want to adjust the distance between the setnames (such as HCC and ICC) and the circle, or do something which making the title (TNK) will not cover the setnames.

@yanlinlin82
Copy link
Owner

Hi, @SSSJe

Will you try this please:

g = ggvenn(...) + ... # your venn plotting

# Adjusting plot margin and title space
g + theme(
  plot.margin = margin(2, 2, 2, 2, "cm"), # Increase plot margins (top, right, bottom, left)
  plot.title = element_text(size = 20, hjust = 0.5, vjust = -1,
    margin = margin(b = 1, unit = "cm")), # Increase title size and space below the title
)

@SSSJe
Copy link
Author

SSSJe commented Jan 24, 2024

Hi, @SSSJe

Will you try this please:

g = ggvenn(...) + ... # your venn plotting

# Adjusting plot margin and title space
g + theme(
  plot.margin = margin(2, 2, 2, 2, "cm"), # Increase plot margins (top, right, bottom, left)
  plot.title = element_text(size = 20, hjust = 0.5, vjust = -1,
    margin = margin(b = 1, unit = "cm")), # Increase title size and space below the title
)

Thank you very much!!! Lol
It's useful to solve this problem~

@SSSJe
Copy link
Author

SSSJe commented Jan 24, 2024

amazing… With my trying, the current situation doesn't require setting edge values, and there won't be any occlusion according to my previous method.

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

2 participants