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

[Bug]: polygon from axvspan not correct in polar plot after set_xy #27824

Closed
keatonb opened this issue Feb 26, 2024 · 1 comment
Closed

[Bug]: polygon from axvspan not correct in polar plot after set_xy #27824

keatonb opened this issue Feb 26, 2024 · 1 comment

Comments

@keatonb
Copy link

keatonb commented Feb 26, 2024

Bug summary

When updating vertices of polygon produced with axvspan on polar axes, the resultant polygon does not seem to follow the polar projection.

Code for reproduction

import matplotlib.pyplot as plt

fig, axs = plt.subplots(1, 2, subplot_kw={'projection': 'polar'})

# What I expect
polygon1 = axs[0].axvspan(0,np.pi/2)
axs[0].set_title("What I expect")

# What I get
polygon2 = axs[1].axvspan(0,np.pi/2)
polygon2.set_xy(polygon2.get_xy()) #this should not change the polygon data
axs[1].set_title("What I get")

plt.show()

Actual outcome

Figure 19

Expected outcome

I expect that polygon2.set_xy(polygon2.get_xy()) should not change the polygon.

Additional information

No response

Operating system

OS X

Matplotlib Version

3.8.0

Matplotlib Backend

module://ipympl.backend_nbagg

Python version

Python 3.11.5

Jupyter version

7.0.6

Installation

conda

@QuLogic
Copy link
Member

QuLogic commented Mar 12, 2024

I believe this was fixed by #26788, and should be working in 3.9.0

@QuLogic QuLogic closed this as completed Mar 12, 2024
@QuLogic QuLogic added this to the v3.9.0 milestone Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants