Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding polar and other plots #2170

Merged
merged 39 commits into from
Sep 16, 2020
Merged

Adding polar and other plots #2170

merged 39 commits into from
Sep 16, 2020

Conversation

jsub1
Copy link
Contributor

@jsub1 jsub1 commented Sep 11, 2020

This PR adds the ability to change the projection of the Matplotlib 2D scatter plot. To make sure that selecting ROIs on the various projections, this PR also adds the ability for ROI subset states to apply an arbitrary transform before testing for inclusion in the ROI. There are also lots of tweaks and changes to the scatter code to make sure that things like script export, color-maps, scaling, vectors, error bars, limits, log, tick formatting, etc. behave when using the different projections. A number of tests are added as well. Some future improvements that can be made to this include:

  • Curving the theta error bars when using a polar projection.
  • Being smarter about units when axes are inherently angular. Currently the code naively assumes that the values of angular axis are in radians. However, if the selected attribute has an attached angular unit, we could convert it before plotting and ROI selection.

jsub1 added 30 commits July 23, 2020 10:07
…jections can't be saved to a session file just yet
… Also made tweaks to tests on limits when changing modes.
…lsphere projections throw if the plot artist is set to an empty array.
@codecov
Copy link

codecov bot commented Sep 11, 2020

Codecov Report

Merging #2170 into master will increase coverage by 0.12%.
The diff coverage is 92.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2170      +/-   ##
==========================================
+ Coverage   87.86%   87.99%   +0.12%     
==========================================
  Files         246      247       +1     
  Lines       22709    22944     +235     
==========================================
+ Hits        19954    20189     +235     
  Misses       2755     2755              
Impacted Files Coverage Δ
glue/core/state.py 92.12% <ø> (+0.02%) ⬆️
glue/core/roi.py 91.92% <81.05%> (-1.48%) ⬇️
glue/core/subset.py 89.82% <91.89%> (+0.53%) ⬆️
glue/viewers/scatter/qt/options_widget.py 92.42% <96.55%> (+2.68%) ⬆️
glue/core/roi_pretransforms.py 100.00% <100.00%> (ø)
glue/core/util.py 72.02% <100.00%> (+1.03%) ⬆️
glue/viewers/matplotlib/mpl_axes.py 90.24% <100.00%> (ø)
glue/viewers/matplotlib/qt/data_viewer.py 80.85% <100.00%> (ø)
glue/viewers/matplotlib/toolbar_mode.py 96.11% <100.00%> (+0.11%) ⬆️
glue/viewers/matplotlib/viewer.py 94.30% <100.00%> (+0.37%) ⬆️
... and 17 more

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 d172634...6988854. Read the comment docs.

Copy link
Member

@astrofrog astrofrog left a comment

Choose a reason for hiding this comment

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

Fantastic work! This works very nicely for me. There are some small improvements I think we can do (including the ones you mention) but for now I think we can merge and release this.

@astrofrog astrofrog added this to the v0.16.0 milestone Sep 16, 2020
@astrofrog astrofrog merged commit 182569c into glue-viz:master Sep 16, 2020
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.

2 participants