[ENH] Remove discrete attributes from scatter plot's axes#3434
Merged
Conversation
5cbc1f7 to
02fca55
Compare
Codecov Report
@@ Coverage Diff @@
## master #3434 +/- ##
==========================================
- Coverage 83.27% 83.24% -0.04%
==========================================
Files 365 365
Lines 64305 64276 -29
==========================================
- Hits 53549 53505 -44
- Misses 10756 10771 +15 |
02fca55 to
1cefe13
Compare
VesnaT
reviewed
Dec 5, 2018
VesnaT
reviewed
Dec 5, 2018
VesnaT
reviewed
Dec 5, 2018
VesnaT
reviewed
Dec 5, 2018
VesnaT
requested changes
Dec 5, 2018
Contributor
VesnaT
left a comment
There was a problem hiding this comment.
Until this PR the widget expected self.effective_variables are always set when self.data is not None.
With this change, if there are not continuous variables in input data, self.effective_variables happens to be [None, None], which causes several errors.
Maybe you could add a check in check_data() (clearing the plot and showing an error message would be nice as well).
if self.data is not None:
if not self.data.domain.has_continuous_attributes(True, True):
self.Error.no_continuous_vars()
self.data = None
I don't mind any other solution, just make sure (a potential test - that should probably be added) passes:
def test_change_data(self):
self.send_signal(self.widget.Inputs.data, self.data)
self.send_signal(self.widget.Inputs.data, Table("titanic"))
05c3811 to
80ef6bd
Compare
Contributor
Author
|
Thanks for the fix and the test (I also added a few checks). |
80ef6bd to
a32bed9
Compare
VesnaT
reviewed
Dec 7, 2018
VesnaT
reviewed
Dec 7, 2018
VesnaT
reviewed
Dec 7, 2018
a32bed9 to
eaf793c
Compare
VesnaT
approved these changes
Dec 7, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Fixes #3318.
Includes