Closed
Closed
Copy link
Description
Bug summary
When adding contour label positions manually (either via clicking or specifying an iterable of positions), contours with disconnected parts are not handled correctly, but sometimes rejoined seemingly arbitrarily.
Code for reproduction
import matplotlib.pyplot as plt
import numpy as np
fig, ax = plt.subplots()
x, y = np.mgrid[-1:1:21j, -1:1:21j]
cs = ax.contour(x, y, 1/np.sqrt(0.01+(x+0.3)**2+y**2) + 1/np.sqrt(0.01+(x-0.3)**2+y**2), levels=[7])
cs.clabel(manual=[(0.2, 0.1)])
Actual outcome
Expected outcome
As it looked in matplotlib 3.7.3:
Additional information
No response
Operating system
No response
Matplotlib Version
3.8.0
Matplotlib Backend
No response
Python version
No response
Jupyter version
No response
Installation
conda
Metadata
Metadata
Assignees
Labels
No labels