GeezerVison is showing github.com — "set_rlabel_position" don't work when "set_thetamin" · Issue #15835 · matplotlib/matplotlib
"set_rlabel_position" don't work when "set_thetamin" #15835Description
Bug report
Bug summary
"set_rlabel_position" don't work when "set_thetamin".
Code for reproduction
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111,polar=True)
ax.set_thetamin(0)
ax.set_thetamax(180)
ax.set_rlabel_position(45)
Actual outcome

Expected outcome
Radius label at 45 degree.
Matplotlib version
-
Operating system: Win10
-
Matplotlib version: 3.1.0
-
Matplotlib backend (print(matplotlib.get_backend())): Qt5Agg
-
Python version:
-
Jupyter version (if applicable):
-
Other libraries:
Reacted by xerxesr, vbidula, Fabio Carrara, Gábor Kovács, Leo Saffin and Alexander Skorikov Activityanntzer commented on Dec 12, 2019 Looks like this comes from
|
visible = not _is_full_circle_deg(thetamin, thetamax) |
|
# For backwards compatibility, any subclassed Axes might override the |
|
# spines to not include start/end that PolarAxes uses. |
|
start = self.spines.get('start', None) |
|
end = self.spines.get('end', None) |
|
if start: |
|
start.set_visible(visible) |
|
if end: |
|
end.set_visible(visible) |
|
if visible: |
|
yaxis_text_transform = self._yaxis_transform |
|
else: |
|
yaxis_text_transform = self._r_label_position + self.transData |
and doing the obvious change here (removing the check for visible at the end) shows why this is the case: if thetamin/max are changed but not rlabel_position, one would prefer if the rlabel to auto-move to the edges of the wedge, rather than e.g. outside of it.
I guess we need to distinguish "manually set rlabel" (which would be respected no matter what) and auto-set rlabel (which starts at 22.5°, but can automove if theta limits are changed) here... github-actions commented on Jul 3, 2023 This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|