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

[ENH] Scatterplot: Use opacity for contrast #5684

Merged
merged 1 commit into from
Dec 10, 2021

Conversation

janezd
Copy link
Contributor

@janezd janezd commented Nov 5, 2021

Issue

Ref: #5425

Instead of introducing a new slider, the opacity slider behaves differently in presence of a subset: it still regulates the opacity of the brush of subset, but at the same time it decreases the opacity of the pen of points not in the subset. The slider is still named opacity because I don't think the user will notice that (s)he now essentially regulates the contrast.

For now I implemented this for discrete coloring. If we decide that we like it, I'll change the continuous palette and monochromatic scatterplot in the same fashion.

Comments welcome.

Description of changes
Includes
  • Code changes
  • Tests
  • Documentation

@janezd janezd force-pushed the subset-visibility branch from 0b73ef4 to d6261dd Compare November 6, 2021 17:01
@janezd
Copy link
Contributor Author

janezd commented Nov 6, 2021

Alternative -- better, I think: decrease opacity for non-subset points faster than for the subset. This solution has a single slider which controls both, opacity and contrast at the same time. Two sliders would, I think, have to have the same effect as this single slider, but with more work from the user.

Screenshot 2021-11-06 at 18 50 43

That's what it looks like:
Screenshot 2021-11-06 at 17 58 49
Screenshot 2021-11-06 at 17 58 55
Screenshot 2021-11-06 at 17 59 06
Screenshot 2021-11-06 at 17 59 12
Screenshot 2021-11-06 at 17 59 18

@janezd janezd added the needs discussion Core developers need to discuss the issue label Nov 11, 2021
@janezd janezd self-assigned this Nov 19, 2021
@janezd janezd removed the needs discussion Core developers need to discuss the issue label Nov 19, 2021
@janezd janezd removed their assignment Nov 19, 2021
@janezd janezd changed the title [RFC] Scatterplot: Use opacity for contrast [ENH] Scatterplot: Use opacity for contrast Nov 19, 2021
@janezd
Copy link
Contributor Author

janezd commented Nov 19, 2021

I'd appreciate a quick review (from the point of the user for now) before I update the failing tests. @ajdapretnar or @markotoplak, maybe?

@ajdapretnar
Copy link
Contributor

I'm happy to do it.

@ajdapretnar ajdapretnar self-assigned this Nov 19, 2021
@codecov
Copy link

codecov bot commented Nov 25, 2021

Codecov Report

Merging #5684 (df2369d) into master (3aae878) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #5684      +/-   ##
==========================================
- Coverage   86.12%   86.12%   -0.01%     
==========================================
  Files         315      315              
  Lines       66074    66081       +7     
==========================================
+ Hits        56905    56911       +6     
- Misses       9169     9170       +1     

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.

2 participants