Skip to content

[FIX] MDS Widget: Handle NaN values for plot point styling#1931

Merged
lanzagar merged 2 commits intobiolab:masterfrom
ales-erjavec:fixes/mds-size-nan
Jan 18, 2017
Merged

[FIX] MDS Widget: Handle NaN values for plot point styling#1931
lanzagar merged 2 commits intobiolab:masterfrom
ales-erjavec:fixes/mds-size-nan

Conversation

@ales-erjavec
Copy link
Copy Markdown
Contributor

Issue

Fixes gh-1930

Description of changes

Make _setup_plot more robust for NaN values in the data.

Includes
  • Code changes
  • Tests
  • Documentation

@codecov-io
Copy link
Copy Markdown

Current coverage is 89.27% (diff: 100%)

Merging #1931 into master will not change coverage

@@             master      #1931   diff @@
==========================================
  Files            86         86          
  Lines          9116       9116          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits           8138       8138          
  Misses          978        978          
  Partials          0          0          

Sunburst

Powered by Codecov. Last update c3a6b16...7165280

@ales-erjavec ales-erjavec added this to the 3.3.10 milestone Jan 18, 2017
size_data = column(self.data, size_var, dtype=float)
size_data = scale(size_data)
size_data = MinPointSize + size_data * point_size
size_data[numpy.isnan(size_data)] = 1 # maybe 0?
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How about MinPointSize (or equivalently 0, but one line higher)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Would prefer to keep the points with unknown size visually distinguished from the rest (in some way)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

OK, then the current value of 1 should be fine. It's already smaller than anything else.

@lanzagar lanzagar merged commit 6661596 into biolab:master Jan 18, 2017
astaric pushed a commit to astaric/orange3 that referenced this pull request Jan 18, 2017
[FIX] MDS Widget: Handle NaN values for plot point styling
(cherry picked from commit 6661596)
@ales-erjavec ales-erjavec deleted the fixes/mds-size-nan branch January 27, 2017 10:39
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