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

Modifications to polar graphs #2267

Merged
merged 11 commits into from
Feb 3, 2022
Merged

Conversation

Carifio24
Copy link
Member

This PR implements the changes to polar scatterplot styling discussed at the glue meeting on 1/13/2022. In particular, these changes are:

Rather than display axis labels along the bottom and side of the plot (which doesn't really make sense for a polar plot), the axis labels are included in the angular and radial tick marks. In particular, the angular tick at zero angle is of the form label=0, while the outermost radial tick has the form label=<value>. Additionally, the radial tick marks are italicized to make the two sets of ticks clearly distinct.
polar_plot

If the label is an empty string, the equals is omitted:
polar_plot_empty_label

When in polar mode, the axis widget is adjusted accordingly:
axes_options

@codecov
Copy link

codecov bot commented Feb 3, 2022

Codecov Report

Merging #2267 (2e99024) into main (40b2208) will increase coverage by 0.02%.
The diff coverage is 97.02%.

❗ Current head 2e99024 differs from pull request most recent head f503a4a. Consider uploading reports for the commit f503a4a to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2267      +/-   ##
==========================================
+ Coverage   88.04%   88.06%   +0.02%     
==========================================
  Files         247      247              
  Lines       23196    23279      +83     
==========================================
+ Hits        20422    20500      +78     
- Misses       2774     2779       +5     
Impacted Files Coverage Δ
glue/core/util.py 77.69% <94.73%> (+4.13%) ⬆️
glue/viewers/matplotlib/viewer.py 94.38% <100.00%> (+0.08%) ⬆️
glue/viewers/scatter/python_export.py 97.82% <100.00%> (+0.09%) ⬆️
glue/viewers/scatter/qt/options_widget.py 94.25% <100.00%> (+0.83%) ⬆️
glue/viewers/scatter/viewer.py 99.04% <100.00%> (+0.11%) ⬆️
glue/_mpl_backend.py 80.00% <0.00%> (-8.00%) ⬇️

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 40b2208...f503a4a. 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.

Looks good! Just a couple of small comments - also the codestyle CI job is failing and that is real, so could you fix the errors? (tox -e codestyle to fix locally)

elif self.using_polar():
self.state.x_axislabel = ""
# elif self.using_polar():
# self.state.x_axislabel = ""
Copy link
Member

Choose a reason for hiding this comment

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

Can this code now be removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, has been removed

elif self.using_polar():
self.state.y_axislabel = ""
# elif self.using_polar():
# self.state.y_axislabel = ""
Copy link
Member

Choose a reason for hiding this comment

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

Can this be removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, has been removed

@astrofrog
Copy link
Member

Could you also rebase this to pick up the latest CI fixes?

@Carifio24
Copy link
Member Author

I've rebased these commits onto the current master and added a changelog entry. Looks like all of the CI is passing except codecov/project. I'm not sure what the best way to handle that is.

@astrofrog
Copy link
Member

@Carifio24 - I think we can ignore the coverage failure, most changes here are covered (as shown by the codecov/patch job)

@astrofrog astrofrog merged commit 55aca29 into glue-viz:main Feb 3, 2022
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