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

wrong leaves determination of _dendrogram.py #1181

Closed
444thLiao opened this issue Sep 17, 2018 · 2 comments
Closed

wrong leaves determination of _dendrogram.py #1181

444thLiao opened this issue Sep 17, 2018 · 2 comments
Labels
bug something broken
Milestone

Comments

@444thLiao
Copy link
Contributor

When I using the function for creating dendrogram, I meet some wrong presentation of the leaves.
all zero leaves

In your code(~/.local/lib/python3.6/site-packages/plotly/figure_factory/_dendrogram.py), we can see that
original code which come from ~/.local/lib/python3.6/site-packages/plotly/figure_factory/_dendrogram.py

Above code without comment is the original code for determination the y axis tick or labels. In the first image I provide, you can see that 138-140 line code will raise silent error which mean wrong alignment of leaves of dendrogram and labels.

So I make a litter bit revise of this by 142-145 code (Of course without comment and I have use this in my computer, as far as I see, it will not raise any conflict.) .

Here is the code

        if len(self.zero_vals) > len(yvals) + 1:
            l_border = int(min(self.zero_vals))
            r_border = int(max(self.zero_vals))
            self.zero_vals = [v for v in range(l_border,r_border + 1, int((r_border-l_border) / len(yvals)))]

#1180

@jonmmease
Copy link
Contributor

Hi @444thLiao , thanks for the report. I left some comments over in #1180 , so we can continue the conversation over there.

@jonmmease jonmmease added the bug something broken label Sep 17, 2018
@jonmmease jonmmease added this to the v3.3.0 milestone Sep 23, 2018
@jonmmease
Copy link
Contributor

Done in #1186. Thanks @444thLiao!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

No branches or pull requests

2 participants