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

[FIX] OWScatterOWScatterPlotGraph: Match group colors with marker colors #3053

Merged
merged 1 commit into from
Jun 7, 2018

Conversation

VesnaT
Copy link
Contributor

@VesnaT VesnaT commented Jun 5, 2018

Issue

Fixes #3051

Description of changes
Includes
  • Code changes
  • Tests
  • Documentation

@VesnaT VesnaT changed the title OWScatterOWScatterPlotGraph: Match group colors with marker colors [FIX]OWScatterOWScatterPlotGraph: Match group colors with marker colors Jun 5, 2018
@VesnaT VesnaT changed the title [FIX]OWScatterOWScatterPlotGraph: Match group colors with marker colors [FIX] OWScatterOWScatterPlotGraph: Match group colors with marker colors Jun 5, 2018
mask = (selection != 0)
selection = selection.copy()
selection[mask] = selection[mask] - 1
selection[~mask] = selection[~mask] = max_sel
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just subtract 1 from everything and then replace -1 with something else?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because in some cases array's dtype is "uint8". In that case subtracting 1 from 0 results in 255.
I was thinking about changing dtype, but I think the above solution is more robust.

@VesnaT VesnaT force-pushed the scatter_plot_group_colors branch from 7029b5d to c13d5a6 Compare June 6, 2018 07:05
@BlazZupan BlazZupan merged commit 4a8c2eb into biolab:master Jun 7, 2018
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

Successfully merging this pull request may close these issues.

3 participants