Skip to content

Commit

Permalink
fix: overlap skips empty paths
Browse files Browse the repository at this point in the history
  • Loading branch information
andrzejnovak committed Mar 21, 2024
1 parent 0d49938 commit edcba62
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/mplhep/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,8 @@ def overlap(ax, bbox, get_vertices=False):
transform = handle.get_data_transform()
bboxes.append(handle.get_bbox().transformed(transform))
else:
if len(handle.get_path().vertices) == 0:
continue
lines.append(handle.get_path().interpolated(20))

for handle in ax.texts:
Expand Down

0 comments on commit edcba62

Please sign in to comment.