-
Notifications
You must be signed in to change notification settings - Fork 97
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
Using leftLabels / rightLabels #16
Comments
To provide an update, I used the updates from pull request #15 and found the issue resolved so long as I reversed the label lists. So to have the graph display |
In addition to the bug mentioned above, there is bug in sankey function when checking right labels. Code should read:
|
Nice find @magerstein, could you create a pull request in order to get credited for it ? |
I was using it and just realized it as well! |
This is a great tool you have here - I'd been trying to make a Sankey using Plotly all morning to no avail, but this was relatively straightforward and looks good. However I'm struggling to order the labels for presentation. I have 9 string labels on the left, and seven string labels on the right but I'm not sure what to pass to
leftLabels
and 'rightLabels` to define the order. I've passed each arg a list of the labels in the order I want, but I get a LabelMismatch error.I tried sorting my data before running using
.sort_values
in pandas however that resulted in incorrect output with the wrong values being assigned to the wrong links (despite the values being correctly ordered in the data frame). I don't know if this is actually the result of a miss-ordering of the labels or if the entirety of the visualised data is incorrect.I also noted what I think is a mistake in the
check_data_matches_labels
function. I believe it should beif len(labels) > 0:
Essentially I can get an accurate visual now, but it would be great to be able to reorder the data so that both left and right sets of labels are in alphabetical order, and the links adjust to match.
The text was updated successfully, but these errors were encountered: