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

Add option to set dendrogram color threshold #1214

Merged
merged 1 commit into from
Oct 15, 2018

Conversation

paulamool
Copy link
Contributor

@paulamool paulamool commented Oct 4, 2018

Hope this works @Elpiro @jonmmease


Adds a new optional color_threshold argument to the create_dendrogram function to customize the dendrogram "cut height" at which clusters are separated.

This work was initially started by @Elpiro in #1075


Examples

import plotly.graph_objs as go
import plotly.figure_factory as ff
import numpy as np

X = np.random.rand(15, 15)

Default behavior

dendro = ff.create_dendrogram(X)
fig = go.FigureWidget(dendro)
fig

newplot

With a color threshold

dendro = ff.create_dendrogram(X, color_threshold=1.6)
fig = go.FigureWidget(dendro)
fig

newplot 1

@paulamool
Copy link
Contributor Author

Related to pull request #1075 Added parameter to choose color_threshold and issue #995

@jonmmease
Copy link
Contributor

Thanks @paulamool and @Elpiro, I'll take a look in detail soon, but this looks like a great addition and we should be able to get this into 3.4.0.

@jonmmease
Copy link
Contributor

Looks good and works well. Merging. Thanks for the work @Elpiro and thanks @paulamool for pushing it over the finish line!

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

Successfully merging this pull request may close these issues.

2 participants