glue-viz / glue-plotly

Experimental plot.ly plugin for glue
BSD 3-Clause "New" or "Revised" License
2 stars 8 forks source link

Add support for error bars, vectors, point size scaling to 3D scatter exporter. #18

Closed Carifio24 closed 1 year ago

Carifio24 commented 2 years ago

This PR contains improvements to the 3D scatter viewer from @victoriaono and myself. While we had previously opened #16, I've decided to split that into multiple PRs that each deal with changes to a specific exporter, just to keep things from getting unwieldy. This PR contains the 3D scatter-specific changes from #16, as well as some additional changes.

The features added to the 3D scatter viewer are:

There are a few issues, as well as a few choices that I think are worth mentioning.

To warn users that the Plotly output may differ from what they see in glue, a warning message is displayed before exporting, which is attached to the (new) setting SHOW_WARN_PLOTLY_3D_GRAPHICS_DIFFERENT. Personally I think it's better to show one catch-all "things might be different" message rather than separate messages for each component that might differ (vectors, etc.).

I'll add some tests once we see whether or not there's more to be done with this.

codecov[bot] commented 1 year ago

Codecov Report

Base: 85.78% // Head: 79.31% // Decreases project coverage by -6.47% :warning:

Coverage data is based on head (ef2e465) compared to base (08bda43). Patch coverage: 39.24% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #18 +/- ## ========================================== - Coverage 85.78% 79.31% -6.48% ========================================== Files 8 8 Lines 401 464 +63 ========================================== + Hits 344 368 +24 - Misses 57 96 +39 ``` | [Impacted Files](https://codecov.io/gh/glue-viz/glue-plotly/pull/18?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=glue-viz) | Coverage Δ | | |---|---|---| | [glue\_plotly/html\_exporters/scatter3d.py](https://codecov.io/gh/glue-viz/glue-plotly/pull/18/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=glue-viz#diff-Z2x1ZV9wbG90bHkvaHRtbF9leHBvcnRlcnMvc2NhdHRlcjNkLnB5) | `58.78% <33.80%> (-17.89%)` | :arrow_down: | | [glue\_plotly/html\_exporters/tests/test\_scatter3d.py](https://codecov.io/gh/glue-viz/glue-plotly/pull/18/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=glue-viz#diff-Z2x1ZV9wbG90bHkvaHRtbF9leHBvcnRlcnMvdGVzdHMvdGVzdF9zY2F0dGVyM2QucHk=) | `97.67% <87.50%> (+0.30%)` | :arrow_up: | | [glue\_plotly/html\_exporters/scatter2d.py](https://codecov.io/gh/glue-viz/glue-plotly/pull/18/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=glue-viz#diff-Z2x1ZV9wbG90bHkvaHRtbF9leHBvcnRlcnMvc2NhdHRlcjJkLnB5) | `82.52% <0.00%> (+0.97%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=glue-viz). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=glue-viz)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.