xgi-org / xgi

CompleX Group Interactions (XGI) is a Python package for higher-order networks.
https://xgi.readthedocs.io
Other
180 stars 28 forks source link

Should draw with convex hull be the default and only behavior? #509

Open nwlandry opened 7 months ago

nwlandry commented 7 months ago

With PR #491, drawing edges as convex hulls is now an option of draw. I'm wondering, however, if there is a case where we don't want this behavior. I'm specifically thinking of Issue #466, which occurs because the default behavior does NOT create convex hulls for edges. We could achieve roughly the same look by setting the default radius of the edges to 0.

nwlandry commented 6 months ago

@thomasrobiglio --- any input on this? I know that you wrote the code for the hypergraph hull.

thomasrobiglio commented 6 months ago

I will have a look and get back to you on this!

thomasrobiglio commented 6 months ago

If I understand correctly this would make the default drawing style the rightmost plot in this screenshot, right?

Screenshot 2024-04-04 alle 10 15 13

I don't have a strong opinion on this. In this case of the sunflower hypergraph the new default would solve the issue, but in the general case with this choice we would remove one option for the personalization of plots.

nwlandry commented 6 months ago

Thanks for the input! Yes, the left-most plot is what I was thinking for the default behavior. I'll make it an item of discussion for our next meeting!

maximelucas commented 6 months ago

The left plot is the current default, and you're suggesting to set the right one as the new default, right?

I agree with Thomas on this:

In this case of the sunflower hypergraph the new default would solve the issue, but in the general case with this choice we would remove one option for the personalization of plots.

This is a rather specific example, and I wouldn't change the default to drawing hulls just for that one. Were you thinking it would be good as a new default in other cases too?

nwlandry commented 5 months ago

These are good points, but the issue is not restricted to sunflower hypergraphs. It occurs for any edge if it is large enough (A single edge of size $s\geq 12$ can reproduce this behavior). So maybe my question is whether it makes sense to allow users to draw non-convex edges. Of course, it doesn't matter if we are only drawing edges of sizes 2, 3, and 4 since those edges will be convex anyway.