MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / print_label

Method print_label

lib/matplotlib/contour.py:233–237  ·  view source on GitHub ↗

Return whether a contour is long enough to hold a label.

(self, linecontour, labelwidth)

Source from the content-addressed store, hash-verified

231 return cbook.silent_list('text.Text', self.labelTexts)
232
233 def print_label(self, linecontour, labelwidth):
234 """Return whether a contour is long enough to hold a label."""
235 return (len(linecontour) > 10 * labelwidth
236 or (len(linecontour)
237 and (np.ptp(linecontour, axis=0) > 1.2 * labelwidth).any()))
238
239 def too_close(self, x, y, lw):
240 """Return whether a label is already near this location."""

Callers 1

labelsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected