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

Color assignment error in visualization.py::plot_search_distance_result #9

Open
knorthover opened this issue Feb 7, 2023 · 0 comments

Comments

@knorthover
Copy link

tssearch/utils/visualization.py, function plot_search_distance_result() doesn't map colors correctly. In particular the minimum and maximum distance colors are incorrectly assigned to out of range values, making the plot misleading.

Line 114 in Scaling of distance for color lookup is incorrect:
d_idx = int((d - min_dist) * cmap.N / delta_dist) - 1 # INCORRECT
correct code shown below.
d_idx = int((d - min_dist) * (cmap.N -1) / delta_dist)

Sample values with incorrect and corrected scaling
tsssearch_plot_bug.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant