jmw86069/venndir

options to avoid printing labels not working

biointf opened this issue · 3 comments

Hi James
I tried to print a 7-lists venn plot. Very nice plot but I need to manually customize the labels with %ages instead of items. I tried to set options about labels and sets printing to "off"
e.g. venndir(setlist, proportional = TRUE, show_items = "none", show_label = "none", display_counts = FALSE,return_items = FALSE , show_set = "none" )
but the picture is still full of contents, as such:
Schermata 2022-10-20 alle 13 27 52
May you check the code please? I tried to wotk on label_df object in the function but unsuccesfully
Many thanks
Luca

I appreciate you filing the issue above, and again somehow I missed it until recently! I'm so sorry. Heh.
(I added some filters to my Github entry page to help.)

The figure above is a mess, I agree with you.
The short summary is that I'm working on a few updates that I hope will help.

The most challenging aspect for me has been with proportional Venn (Euler) diagrams. The circles and overlaps are unpredictable: sometimes the overlaps do not exist; sometimes there is no unique place to label a circle, like the circle labeled "Actioned" above.

Some workarounds:

  • overlap_type="overlap" # will hide all the arrows, since everything is up-arrow anyway.
  • inside_percent_threshold=0 # will place all numbers into the center of the overlap region.
  • plot_warning=FALSE # will hide the warning message displayed behind the plot.
  • font_cex=c(1, 0.7, 0.5) # will size the main set label at 1x normal size, the total overlap count at 0.7x normal size, and the signed labels at 0.5x normal size.

In the updated venndir:

  • the warning label is placed at the bottom of the plot device, which gives more room for placement away from the Venn circles. Also, when too many groups are hidden, it displays the number of overlaps hidden, without each overlap label (and counts) being shown.
  • the space between main counts (left) and signed counts (right) is smaller, making the label smaller.

Closing this issue for now, but please re-open if you have similar use case.

I believe the scenario can be controlled in future using the argument show_labels="Nc" in venndir(), which will display only set names outside the diagram, counts inside each polygon, and will hide the directional arrows.

And yes, 7-way Venn diagrams are hard, but sometimes they can be really intuitive - as with nested circles.
Thanks for posting the issue.