@@ -248,31 +248,6 @@ def too_close(self, x, y, lw):
248248 return any ((x - loc [0 ]) ** 2 + (y - loc [1 ]) ** 2 < thresh
249249 for loc in self .labelXYs )
250250
251- @_api .deprecated ("3.4" )
252- def get_label_coords (self , distances , XX , YY , ysize , lw ):
253- """
254- Return x, y, and the index of a label location.
255-
256- Labels are plotted at a location with the smallest
257- deviation of the contour from a straight line
258- unless there is another label nearby, in which case
259- the next best place on the contour is picked up.
260- If all such candidates are rejected, the beginning
261- of the contour is chosen.
262- """
263- hysize = int (ysize / 2 )
264- adist = np .argsort (distances )
265-
266- for ind in adist :
267- x , y = XX [ind ][hysize ], YY [ind ][hysize ]
268- if self .too_close (x , y , lw ):
269- continue
270- return x , y , ind
271-
272- ind = adist [0 ]
273- x , y = XX [ind ][hysize ], YY [ind ][hysize ]
274- return x , y , ind
275-
276251 def _get_nth_label_width (self , nth ):
277252 """Return the width of the *nth* label, in pixels."""
278253 fig = self .axes .figure
0 commit comments