-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Bug]: set_theta_offset removes grid outline #26972
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
Comments
Thanks for reporting this. However I cannot run the script and it looks like you forgot to include the definition of "azis" and "r" in the script. Would you add that so we can get the exactly same result as you? |
@stevezhang1999 thanks for flagging that, have updated now |
Thanks, now I can reproduce this with mpl = 3.7.2 |
I think this results from a calculation flaw within |
Similar to the axhline suggestion, I can create a quick workaround for the "spine" using a plot command like this: ax.plot(np.linspace(0, 2*np.pi, 50), np.ones(50)*250, color='black', linestyle='solid',linewidth=2) This is much more relevant for my uses anyway, but obviously doesn't solve the bug within matplotlib. |
@stevezhang1999 do you think this is something more like #13717? |
Update: I think the results in #13717 looks good. I suspect that they are related and will look at it later tonight. To fix this issue, I believe we need to replace the floating point comparison inside with np.isclose() - but it will break many tests and I’m still looking at them. |
Uh oh!
There was an error while loading. Please reload this page.
Bug summary
When producing a polar plot,
set_theta_offset
removes the outer gridlines.Code for reproduction
Actual outcome
First axis has no "set_theta_offset", which means the plot starts at 90. Second axis has "set_theta_offset", which rotates the plot to start at 0, but it removes the black outline.
Expected outcome
Expect ax2 above to have a black circular outline as in ax1.
Additional information
No response
Operating system
Windows
Matplotlib Version
3.7.1
Matplotlib Backend
module://matplotlib_inline.backend_inline
Python version
3.11.3
Jupyter version
6.5.4
Installation
conda
The text was updated successfully, but these errors were encountered: