Skip to content

Commit 49d5ced

Browse files
authored
Merge pull request #9989 from jklymak/Fix-clabel-manual-space
FIX: clabel manual spacing was incorrect
2 parents fb18b4e + 815601d commit 49d5ced

File tree

7 files changed

+247
-622
lines changed

7 files changed

+247
-622
lines changed

lib/matplotlib/contour.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,9 @@ def add_label_near(self, x, y, inline=True, inline_spacing=5,
575575
# Get label width for rotating labels and breaking contours
576576
lw = self.get_label_width(self.labelLevelList[lmin],
577577
self.labelFmt, self.labelFontSizeList[lmin])
578+
# lw is in points.
579+
lw *= self.ax.figure.dpi / 72.0 # scale to screen coordinates
580+
# now lw in pixels
578581

579582
# Figure out label rotation.
580583
if inline:
-523 Bytes
Loading
Binary file not shown.
2.05 KB
Loading

0 commit comments

Comments
 (0)