jolars / eulerr

Area-Proportional Euler and Venn Diagrams with Ellipses
https://jolars.github.io/eulerr/
GNU General Public License v3.0
129 stars 18 forks source link

About the missing value #71

Closed Codezy99 closed 4 years ago

Codezy99 commented 4 years ago

Hi Jolars,

thank you for your amazing package. Recently, I met a problem when I use the package. I made the plot with the code:

   fit2 <- eulerr::euler(c('1ug' = 38066, '300ng' = 569, '100ng' = 23, '50ng' = 6,
                "1ug&300ng" = 7211, "1ug&300ng&100ng" = 819, "1ug&100ng"= 88,
                "1ug&300ng&100ng&50ng" = 162, "1ug&300ng&50ng" = 65,"1ug&50ng" = 9,
                "300ng&100ng" = 15,"50ng&100ng" = 1))
   plot(fit2,
        labels = F,
        edges = F,
        fontsize = 6,
        legend = T,
        quantities = list(fontsize = 8),adjust_labels = F)

But in the Euler plot, some values, e.g. "1ug&300ng&50ng" = 65 and '50ng' =6, are missing. I was wondering whether it is possible to correct this problem. Thank you : )

jolars commented 4 years ago

That's because the fit is not exact. Always consider the fit before plotting. Just call fit2 to see how well the algorithm did.

You can always try shape = "ellipse", which might give you a better fit.

Codezy99 commented 4 years ago

I also tried shape = "ellipse" but it did not give me the plot that I want. Anyway, thank you for answering my question. All the best 👍