Closed Carifio24 closed 2 years ago
Merging #14 (128045e) into main (7d3eddf) will decrease coverage by
0.36%
. The diff coverage is33.33%
.
@@ Coverage Diff @@
## main #14 +/- ##
==========================================
- Coverage 86.11% 85.75% -0.37%
==========================================
Files 8 8
Lines 396 400 +4
==========================================
+ Hits 341 343 +2
- Misses 55 57 +2
Impacted Files | Coverage Δ | |
---|---|---|
glue_plotly/html_exporters/scatter2d.py | 81.55% <33.33%> (-0.63%) |
:arrow_down: |
glue_plotly/html_exporters/scatter3d.py | 76.40% <33.33%> (-0.61%) |
:arrow_down: |
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 7d3eddf...128045e. Read the comment docs.
While working on adding the perspective option, I noticed that 3d plots will not export if the size attribute is categorical, despite the fact that this is allowed in glue. This is due to the subtraction in the numerator here being undefined (since the first array is non-numeric).
This PR fixes this issue by using
ensure_numerical
on the categorical data. This is the same technique used in the 2d scatter layer artist, as well as in the 3d scatter layer artist (it doesn't make a call toensure_numerical
there, but it performs the same operation here).This shouldn't be an issue for the 2d scatter export (the 2d scatter viewer restricts the possible size attributes to numerical ones, which the 3d viewer doesn't), but I've added the same operation there for good measure.