@@ -554,23 +554,14 @@ def labels(self, inline, inline_spacing):
554
554
paths = con .get_paths ()
555
555
for segNum , linepath in enumerate (paths ):
556
556
lc = linepath .vertices # Line contour
557
- slc0 = trans .transform (lc ) # Line contour in screen coords
558
-
559
- # For closed polygons, add extra point to avoid division by
560
- # zero in print_label and locate_label. Other than these
561
- # functions, this is not necessary and should probably be
562
- # eventually removed.
563
- if _is_closed_polygon (lc ):
564
- slc = np .row_stack ([slc0 , slc0 [1 :2 ]])
565
- else :
566
- slc = slc0
557
+ slc = trans .transform (lc ) # Line contour in screen coords
567
558
568
559
# Check if long enough for a label
569
560
if self .print_label (slc , lw ):
570
561
x , y , ind = self .locate_label (slc , lw )
571
562
572
563
rotation , new = self .calc_label_rot_and_inline (
573
- slc0 , ind , lw , lc if inline else None , inline_spacing )
564
+ slc , ind , lw , lc if inline else None , inline_spacing )
574
565
575
566
# Actually add the label
576
567
add_label (x , y , rotation , lev , cvalue )
0 commit comments