Skip to content

[ENH] Scatterplot: Implement grouping of selections#2070

Merged
astaric merged 6 commits into
biolab:masterfrom
janezd:scatterplot-group-selections
Mar 13, 2017
Merged

[ENH] Scatterplot: Implement grouping of selections#2070
astaric merged 6 commits into
biolab:masterfrom
janezd:scatterplot-group-selections

Conversation

@janezd
Copy link
Copy Markdown
Contributor

@janezd janezd commented Mar 2, 2017

Instead of annotating selected data with "No" and "Yes", use G0, G1, G2 ... when data is selected is subsequent groups using Shift or Cmd/Ctrl modifier.

Connect File -> Scatter plot, and then Scatter plot to a Table and also to another Scatter plot, both through signal Data (not Selection). Now select several groups in the first scatter plot by using the Shift modifier and see the results in the other scatter plot and table.

The change does not affect the other Scatter plot's output.

We can add a check box "Group selections" to enable or disable this behaviour. However, I think this should be the default behaviour and I see little reason why the user would want to disable it.

Includes
  • Code changes
  • Tests
  • Documentation

@janezd janezd force-pushed the scatterplot-group-selections branch from 7079244 to 64177cf Compare March 2, 2017 21:17
@janezd
Copy link
Copy Markdown
Contributor Author

janezd commented Mar 2, 2017

@astaric, I defined a GUI for this. :)

@codecov-io
Copy link
Copy Markdown

codecov-io commented Mar 2, 2017

Codecov Report

Merging #2070 into master will increase coverage by 0.05%.
The diff coverage is 95.34%.

@@            Coverage Diff             @@
##           master    #2070      +/-   ##
==========================================
+ Coverage   70.15%   70.21%   +0.05%     
==========================================
  Files         315      315              
  Lines       54096    54209     +113     
==========================================
+ Hits        37952    38061     +109     
- Misses      16144    16148       +4

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aa30c1f...5052b08. Read the comment docs.

table = Table(
domain, data.X, data.Y,
metas=np.hstack((data.metas, selection.reshape(len(data), 1))))
table.attributes = data.attributes
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

table.ids = data.ids

@janezd janezd force-pushed the scatterplot-group-selections branch 4 times, most recently from addcd1d to e27ddd1 Compare March 3, 2017 21:49
@janezd
Copy link
Copy Markdown
Contributor Author

janezd commented Mar 3, 2017

radon fails because of an additional case in the switch-ish select method that acts upon different possible keyboard modifiers. There's neither a reasonable way to fix this, nor is there a reason to do so as the method's flow is rather clear.

I'd rather not improve a cc score of a totally unrelated method just to make radon happy.

@janezd janezd force-pushed the scatterplot-group-selections branch from c1319b2 to 3705ad7 Compare March 10, 2017 09:58
@janezd janezd force-pushed the scatterplot-group-selections branch from 3705ad7 to 3c0efd3 Compare March 10, 2017 10:26
@janezd janezd force-pushed the scatterplot-group-selections branch from 3c0efd3 to 5052b08 Compare March 10, 2017 10:58
@astaric astaric merged commit 59c0ded into biolab:master Mar 13, 2017
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.

4 participants