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

Plotting the Euler diagram with percentages with fractions (decimals) #75

Open
JakhongirAlidjanov opened this issue Oct 13, 2020 · 0 comments

Comments

@JakhongirAlidjanov
Copy link

Hi.
Dear authors,

I am trying to plot Euler's diagram with counts and percentages of counts related to the total cohort (n=1615). I have written following code:

plot(euler(c(
  "LUTS"=98,
  "Symptoms of UTI"=46,
  "Positive urine culture"=39,
  "Symptoms of UTI&LUTS"=33,
  "LUTS&Positive urine culture"=24,
  "Symptoms of UTI&Positive urine culture"=22,
  "Symptoms of UTI&LUTS&Positive urine culture"=18),
  input = "union",
  shape = "ellipse"),
  key = TRUE, 
  counts = TRUE,
  quantities = list(type = c("counts", "percent"), font=3, round=2, cex=0.8), 
  fills =list(fill=c(viridis::plasma(n = 3))), alpha = 0.3,
  c("#1957FF", "#FF750C", "#FF220C"), alpha = 0.3,
  edges=list(lty = 1),
  factor_names = TRUE,
  labels=list(font=2, cex=1),
  legend = FALSE)

and expectedly have got following :
изображение
My question is how can one replace the percentages with custom ones, e.g. "59 (3.65%)" instead of "59 (48%)"? Thank you in advance.

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