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

[query/ggplot] fixes math for continuous color scales #13609

Merged
merged 1 commit into from Sep 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion hail/python/hail/ggplot/utils.py
Expand Up @@ -36,7 +36,7 @@ def should_use_scale_for_grouping(scale):

def continuous_nums_to_colors(min_color, max_color, continuous_color_scale):
def adjust_color(input_color):
return (input_color - min_color) / max_color - min_color
return (input_color - min_color) / (max_color - min_color)

def transform_color(input_color):
return plotly.colors.sample_colorscale(continuous_color_scale, adjust_color(input_color))[0]
Expand Down