konstantint / matplotlib-venn

Area-weighted venn-diagrams for Python/matplotlib
MIT License
520 stars 68 forks source link

Near-empty (but non-empty!) subset results in no patch being initialised for it. #49

Closed paulbrodersen closed 4 years ago

paulbrodersen commented 4 years ago

Hi Konstantin,

I had a user raise an issue with my package matplotlib_venn_wordcloud that comes down to matplotlib-venn not producing a patch for a non-empty subset. You do raise a warning (UserWarning: Bad circle positioning), so I assume that is a known issue. Do you have any advice on how to work around it?

Best, Paul

konstantint commented 4 years ago

Hi. One way to overcome such a problem manually is to "regularize" the circle positions by increasing the size of the A&B&C region artificially. This nearly always forces the circles closer together in a "nice" configuration, at the cost of less precise relative sizes (but then, they are not precise in such situations anyway).

There's even a utility function venn3_unweighted which takes one argument specifying region actual sizes and one argument, specifying the numbers to put on the regions.

As far as automating this issue completely, I'd envision having a customizable layout engine framework with more than one predefined engine, but so far I've never found the time for that.

paulbrodersen commented 4 years ago

Thanks for the quick reply. I will play around with venn3_unweighted.