Closed
Description
Bug report
Bug summary
With matplotlib=2.1.2, when I add an Arc
patch to an Axes
instance via a PatchCollection
, the arc always appear as a complete ellipse, regardless of values I set for theta1
and theta2
. When I add the Arc
directly via Axes.add_patch
, I don't have this problem.
Last time I checked (matplotlib 1.4.0), this wasn't an issue. I haven't bisected to figure out when the problem started.
Code for reproduction
import matplotlib.patches as mpatches
import matplotlib.pyplot as plt
import matplotlib.collections as mcol
arc = mpatches.Arc([.5,.5], .5, 1, theta1=0, theta2=60, angle=20)
col = mcol.PatchCollection(patches=[arc])
col_style = mcol.PatchCollection(patches=[arc], facecolors='none', edgecolors='k')
fig, (ax1,ax2,ax3) = plt.subplots(1,3, figsize=(15,4))
ax1.set_title('add_patch')
ax1.add_patch(arc)
ax2.set_title('add_collection')
ax2.add_collection(col)
ax3.set_title('add_collection, style')
ax3.add_collection(col_style)
plt.show()
Actual outcome
Expected outcome
The arc in all three figures should be a 60deg arc, not a complete ellipse.
Matplotlib version
- Operating system: CentOS 7
- Matplotlib version: 2.1.2
- Matplotlib backend (
print(matplotlib.get_backend())
): module://ipykernel.pylab.backend_inline - Python version: 2.7.14 |Anaconda, Inc.| (default, Dec 7 2017, 17:05:42) [GCC 7.2.0]
- Jupyter version (if applicable): 4.4.0
I installed matplotlib via conda: conda create -n py2 python=2 anaconda