Skip to content

Commit

Permalink
Fix palette
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Feb 29, 2020
1 parent 875e951 commit 78a0cf1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion holoviews/core/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def __getitem__(self, num):
def _get_values(self):
if self.values: return self.values
elif self.key:
return self.default_cycles[self.key]
return list(self.default_cycles[self.key])
else:
raise ValueError("Supply either a key or explicit values.")

Expand Down
4 changes: 1 addition & 3 deletions holoviews/plotting/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ def bokeh_palette_to_palette(cmap, ncolors=None, categorical=False):
palette = palette(ncolors)
if reverse: palette = palette[::-1]

return resample_palette(palette, ncolors, categorical, cmap_categorical)
return list(resample_palette(palette, ncolors, categorical, cmap_categorical))


def linear_gradient(start_hex, finish_hex, n=10):
Expand Down Expand Up @@ -898,8 +898,6 @@ def process_cmap(cmap, ncolors=None, provider=None, categorical=False):
else:
raise ValueError("Supplied cmap %s not found among %s colormaps." %
(cmap,providers_checked))
if isinstance(palette, tuple):
palette = list(palette)
else:
try:
# Try processing as matplotlib colormap
Expand Down

0 comments on commit 78a0cf1

Please sign in to comment.