Skip to content

Commit 87adc60

Browse files
committed
Fix color extraction in Bernoulli distribution
1 parent b3d95a4 commit 87adc60

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

ext/ColorfyDistributionsExt.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,11 @@ function Colorfy.repr(values::AbstractVector{<:Bernoulli}, colorscheme, colorran
3838
hs = map(entropy, values)
3939

4040
# derive base colors from mode
41-
n = 2
42-
c = get(colorscheme, 1:n, colorrange)
41+
c = get(colorscheme, 0:1, colorrange)
4342
cs = c[ms .+ 1]
4443

4544
# derive transparency from entropy
46-
a, b = 0.0, log(n)
45+
a, b = 0.0, log(2)
4746
αs = @. 1.0 - (hs - a) / (b - a)
4847

4948
# return final colors

0 commit comments

Comments
 (0)