Skip to content

Commit

Permalink
Update some defaults.
Browse files Browse the repository at this point in the history
  • Loading branch information
lmcinnes committed Apr 29, 2016
1 parent 256cfc0 commit 15e988c
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions hdbscan/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def __init__(self, linkage):
self._linkage = linkage

def plot(self, axis=None, truncate_mode=None, p=0, vary_line_width=True,
cmap='none', colorbar=False):
cmap='viridis', colorbar=True):
"""Plot a dendrogram of the single linkage tree.
Parameters
Expand Down Expand Up @@ -465,7 +465,8 @@ def plot(self, axis=None, truncate_mode=None, p=0, vary_line_width=True,
cmap : string or matplotlib colormap, optional
The matplotlib colormap to use to color the cluster bars.
(default 'none')
A value of 'none' will result in black bars.
(default 'viridis')
colorbar : boolean, optional
Whether to draw a matplotlib colorbar displaying the range
Expand Down Expand Up @@ -646,8 +647,8 @@ def __init__(self, mst, data):
self._mst = mst
self._data = data

def plot(self, axis=None, node_size=10, node_color='k',
node_alpha=0.5, edge_alpha=0.25, edge_cmap='Reds_r',
def plot(self, axis=None, node_size=40, node_color='k',
node_alpha=0.8, edge_alpha=0.5, edge_cmap='viridis_r',
edge_linewidth=2, vary_linewidth=True, colorbar=True):
"""Plot the minimum spanning tree (as projected into 2D by t-SNE if required).
Expand All @@ -658,23 +659,23 @@ def plot(self, axis=None, node_size=10, node_color='k',
The axis to render the plot to
node_size : int, optional
The size of nodes in the plot (default 10).
The size of nodes in the plot (default 40).
node_color : matplotlib color spec, optional
The color to render nodes (default black).
node_alpha : float, optional
The alpha value (between 0 and 1) to render nodes with
(default 0.5).
(default 0.8).
edge_cmap : matplotlib colormap, optional
The colormap to color edges by (varying color by edge
weight/distance). Can be a cmap object or a string
recognised by matplotlib. (default `Reds_r`)
recognised by matplotlib. (default `viridis_r`)
edge_alpha : float, optional
The alpha value (between 0 and 1) to render edges with
(default 0.25).
(default 0.5).
edge_linewidth : float, optional
The linewidth to use for rendering edges (default 2).
Expand Down

0 comments on commit 15e988c

Please sign in to comment.