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

Set minimum width for flow #100

Open
andrewSharo opened this issue Oct 28, 2020 · 2 comments
Open

Set minimum width for flow #100

andrewSharo opened this issue Oct 28, 2020 · 2 comments

Comments

@andrewSharo
Copy link

Fantastic work on this tool! I have found it very helpful and plan to cite it in an upcoming publication. I have one quick question.

I believe there was a design choice made so that each flow has a minimum width in the sankey diagram. I understand this can improve legibility, so that even flows with very small values are easily visible. For example, I have found that if I have one very large flow, with value 10,000 and several smaller flows, with values 100, 10, and 1, the three smaller plots will all have the same width in the diagram even though they are different values (because they are all so much smaller than the 10,000 value flow). The main issue is that this is misleading, but it also leads to a mismatch between the width of the flows and the length of the black bars that represent each source/target. Is there some way to adjust this minimum flow width? I'm happy to upload some screen shots if this is unclear.

Best, Andrew

@ricklupton
Copy link
Owner

@andrewSharo thanks, glad you're finding it helpful!

That's right, there is a minimum link width to keep thin lines visible. It's customizable in the underlying Javascript Sankey diagram library (https://github.com/ricklupton/d3-sankey-diagram#linkMinWidth) but unfortunately not from Python at the moment -- we should add an option for this.

Are you seeing a mismatch with the length of the black bars just on very thin flows if you look closely? I wouldn't have thought this would be very visible since everything is thin anyway; but if the node lines aren't being held to the same minimum height then that should be fixed too.

@andrewSharo
Copy link
Author

@ricklupton

This is several months old, but I am working on this project again and wanted to reply. Yes, the length of the black bars doesn't seem to match up with the length of the flows for some cases (see attached image). You can only see it if you look closely, though. Let me know if you are able to add a minimum link width to the python version. That would allow me to make some subtler points with the figure.

image

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

2 participants