Skip to content

Commit

Permalink
1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
erdogant committed Mar 23, 2022
1 parent 02977ed commit 49a3bed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion scatterd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

__author__ = 'Erdogan Tasksen'
__email__ = 'erdogant@gmail.com'
__version__ = '1.1.0'
__version__ = '1.1.1'

# module level doc-string
__doc__ = """
Expand Down
4 changes: 4 additions & 0 deletions scatterd/scatterd.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ def set_colors(X, labels, fontcolor, c, cmap, gradient=None):
c_rgb, _ = colourmap.fromlist(labels, cmap=cmap, method='matplotlib', gradient=gradient)
elif len(c)==3 and (isinstance(c[0], int) or isinstance(c[0], float)):
c_rgb = np.repeat([c], X.shape[0], axis=0).reshape(-1, 3)
elif len(c)==1 and isinstance(c, list):
c_rgb = np.repeat(c[0], X.shape[0], axis=0).reshape(-1, 3)
else:
c_rgb = np.repeat([0, 0, 0], X.shape[0], axis=0).reshape(-1, 3)

if (gradient is not None):
c_rgb = gradient_on_density_color(X, c_rgb, labels)
Expand Down

0 comments on commit 49a3bed

Please sign in to comment.