-
Notifications
You must be signed in to change notification settings - Fork 314
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
Suggestion: pack() layouts with deterministic outputs #189
Comments
Can you share the actual numbers used? I made this notebook (from Mike's pack-o-matic) to try and reproduce |
Yes, we should make it deterministic. We can use a LCG like we did for d3-force. |
Yes, here is an notebook that should reproduce it. https://observablehq.com/d/6df5cd39d11c9dfa (Apologies that I didn't show the leaf nodes in the original screenshots, I realize now that was probably confusing.) |
FYI I published the forked package. It doesn't have any changes except package name change and patch version. https://www.npmjs.com/package/d3-hierarchy-with-deterministic-pack I hope everything is OK with the authors |
Currently the circle packing layouts calculated by
pack()
are not deterministic. (Possibly because of the Math.random() call in shuffle)? It would be helpful if we had an option to ensure consistent outputs given the same input data.Simple example showing two different outputs with the same data:
The text was updated successfully, but these errors were encountered: