Skip to content

Add option to set dendrogram color threshold#1214

Merged
jonmmease merged 1 commit intoplotly:masterfrom
paulamool:master
Oct 15, 2018
Merged

Add option to set dendrogram color threshold#1214
jonmmease merged 1 commit intoplotly:masterfrom
paulamool:master

Conversation

@paulamool
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

@jonmmease
Copy link
Copy Markdown
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
Copy Markdown
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