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

Add custom text to areas #112

Open
denvdm opened this issue Jun 19, 2024 · 0 comments
Open

Add custom text to areas #112

denvdm opened this issue Jun 19, 2024 · 0 comments

Comments

@denvdm
Copy link

denvdm commented Jun 19, 2024

Hi, is there any way to include custom text/numbers in the venn areas? I hope to include standard deviations in this specific case. I assumed the main 'labels' call, or the one in 'quantities', could do this (see attempted code below), but it produces no text in the overlap area and actually modifies the st.dev. variable numbers (doing some internal calculations it seems), so clearly I'm not fully grasping these options... So, is there a way to include e.g. 'foo', 'bar', 'baz' in each of the three areas (including the overlapping area) of a simple euler?
Thanks!

fit <- euler(combination = c("A" = A1, "B" = A2, "A&B" = A12),
shape = "circle",
control = list(extraopt = FALSE),
input = c("disjoint"))

p <- plot(fit,
fills = list(fill = c(color1,color2,"grey"), alpha = 1),
edges = list(lty = 1, lwd = 6, col = 'white'),
labels = list(labels = c(round(A1/1000,1),round(A2/1000,1),round(A12/1000,1)),
col = "black", fontsize = 24, font = 2, lineheight = 1.5, pos = 4),
quantities = list(type = "counts", labels=c(
paste0(A1,"\n(",A1_sd,")"),
paste0(A2,"\n(",A2_sd,")"),
paste0(A12,"\n(",A12_sd,")")),

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

1 participant