Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Labels
Milestone
Description
Bug report
Bug summary
Contours created usingpyplot.contour
are not correctly removed when labelling the contours usingplt.clabel
invoked withinline=True
and manual positions.
Code for reproduction
importnumpyasnpfrommatplotlibimportpyplotaspltx=np.linspace(-1,1)xx,yy=np.meshgrid(x,x)fig,axes=plt.subplots(1,2,True,True)manual=Noneforaxinaxes:cs=ax.contour(x,x,xx**2+yy**2)clabels=plt.clabel(cs,manual=manual)manual= [label.get_position()forlabelinclabels]
Expected outcome on the left, actual outcome on the right
Matplotlib version
- Operating system: Linux 273ceb986a84 4.9.49-mobyFix autofmt_xdate() when using in conjunction with twinx() #1 SMP Wed Sep 27 23:17:17 UTC 2017 x86_64 GNU/Linux
- Matplotlib version: 2.1.1
- Matplotlib backend (
print(matplotlib.get_backend())
): module://ipykernel.pylab.backend_inline - Python version: 3.6.3
- Jupyter version (if applicable): 4.4.0
- Other libraries: numpy (1.13.3)
All libraries were installed using pip in a docker image derived frompython:3
.