Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added min_alpha parameter to shade and datashade #2109

merged 1 commit into from Nov 9, 2017
Changes from all commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
+7 −1
Diff settings


Just for now

Added min_alpha parameter to shade and datashade

  • Loading branch information...
jbednar committed Nov 9, 2017
commit 7e059174911cc622ac095f8f7b9a4515d26bbb18
@@ -530,6 +530,12 @@ class shade(Operation):
Disable when you do not want the resulting plot to be interactive,
e.g. when trying to display an interactive plot a second time.""")

min_alpha = param.Number(default=40, doc="""
The minimum alpha value to use for non-empty pixels when doing
colormapping, in [0, 255]. Use a higher value to avoid
undersaturation, i.e. poorly visible low-value datapoints, at
the expense of the overall dynamic range..""")

def concatenate(cls, overlay):
@@ -577,7 +583,7 @@ def _process(self, element, key=None):

# Compute shading options depending on whether
# it is a categorical or regular aggregate
shade_opts = dict(how=self.p.normalization)
shade_opts = dict(how=self.p.normalization, min_alpha=self.p.min_alpha)
if element.ndims > 2:
kdims = element.kdims[1:]
categories = array.shape[-1]
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.