Skip to content

Commit 15e988c

Browse files
committed
Update some defaults.
1 parent 256cfc0 commit 15e988c

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

hdbscan/plots.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ def __init__(self, linkage):
432432
self._linkage = linkage
433433

434434
def plot(self, axis=None, truncate_mode=None, p=0, vary_line_width=True,
435-
cmap='none', colorbar=False):
435+
cmap='viridis', colorbar=True):
436436
"""Plot a dendrogram of the single linkage tree.
437437
438438
Parameters
@@ -465,7 +465,8 @@ def plot(self, axis=None, truncate_mode=None, p=0, vary_line_width=True,
465465
466466
cmap : string or matplotlib colormap, optional
467467
The matplotlib colormap to use to color the cluster bars.
468-
(default 'none')
468+
A value of 'none' will result in black bars.
469+
(default 'viridis')
469470
470471
colorbar : boolean, optional
471472
Whether to draw a matplotlib colorbar displaying the range
@@ -646,8 +647,8 @@ def __init__(self, mst, data):
646647
self._mst = mst
647648
self._data = data
648649

649-
def plot(self, axis=None, node_size=10, node_color='k',
650-
node_alpha=0.5, edge_alpha=0.25, edge_cmap='Reds_r',
650+
def plot(self, axis=None, node_size=40, node_color='k',
651+
node_alpha=0.8, edge_alpha=0.5, edge_cmap='viridis_r',
651652
edge_linewidth=2, vary_linewidth=True, colorbar=True):
652653
"""Plot the minimum spanning tree (as projected into 2D by t-SNE if required).
653654
@@ -658,23 +659,23 @@ def plot(self, axis=None, node_size=10, node_color='k',
658659
The axis to render the plot to
659660
660661
node_size : int, optional
661-
The size of nodes in the plot (default 10).
662+
The size of nodes in the plot (default 40).
662663
663664
node_color : matplotlib color spec, optional
664665
The color to render nodes (default black).
665666
666667
node_alpha : float, optional
667668
The alpha value (between 0 and 1) to render nodes with
668-
(default 0.5).
669+
(default 0.8).
669670
670671
edge_cmap : matplotlib colormap, optional
671672
The colormap to color edges by (varying color by edge
672673
weight/distance). Can be a cmap object or a string
673-
recognised by matplotlib. (default `Reds_r`)
674+
recognised by matplotlib. (default `viridis_r`)
674675
675676
edge_alpha : float, optional
676677
The alpha value (between 0 and 1) to render edges with
677-
(default 0.25).
678+
(default 0.5).
678679
679680
edge_linewidth : float, optional
680681
The linewidth to use for rendering edges (default 2).

0 commit comments

Comments
 (0)