-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
patches.Arc objects randomly drawing the full ellipse #9659
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
This isn’t quite as minimal as it could be 😉 If you could isolate which patch causes the error you’ll probably get prompter help. |
This is triggered by drawing "large" ellipses (where large is determined by some random constant of unknown origin); the fix itself turns out to be quite trivial. |
Large width/height triggers a different code path that didn't correctly draw limited arcs instead of the whole ellipse. Fixes matplotlib#9659.
QuLogic, you're absolutely right. There does appear to be a size relationship. Below please find a filtered list of patches to include only the ones on which the problem is observed: import matplotlib
from matplotlib.patches import Arc
import matplotlib.pyplot as plt
patches = [
Arc((143955137, 374), 2471, 749, theta1=0, theta2=180),
Arc((143955276, 374), 2748, 749, theta1=0, theta2=180),
Arc((143955362, 374), 2022, 749, theta1=0, theta2=180),
Arc((143955500, 374), 2299, 749, theta1=0, theta2=180),
Arc((143958871, 374), 3154, 749, theta1=0, theta2=180)
]
print(matplotlib.get_backend())
plt.figure()
ax = plt.gca()
map(ax.add_patch, patches)
plt.xlim(143953697, 143961337)
plt.ylim(-150, 900)
plt.show()
plt.close() |
Bug report
Bug summary
Providing theta1 and theta2 to the Arc constructor sometimes causes the arc to be drawn as the full ellipse.
Code for reproduction
Actual outcome
Expected outcome
All the arcs should be half-ellipses above the line
y = 0.5
.Matplotlib version
print(matplotlib.get_backend())
): MacOSXpython 2.7.14 from homebrew (
brew install python
); matplotlib from pip (sudo -H pip install matplotlib
)The text was updated successfully, but these errors were encountered: