Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-foy committed Oct 31, 2020
1 parent f7a6c03 commit 2627cb6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions heatmap/heatmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,8 @@ def rgb_fn(palette, min_z, max_z):
def rgb_inner(z):
tone = (z - min_z) / (max_z - min_z)
tone_scaled = int(tone * (len(palette)-1))
if tone_scaled >= len(palette):
tone_scaled = len(palette)-1
return palette[tone_scaled]
return rgb_inner

Expand Down

0 comments on commit 2627cb6

Please sign in to comment.