MCPcopy Create free account
hub / github.com/plotly/plotly.py / _is_invalid_contour

Function _is_invalid_contour

plotly/figure_factory/_ternary_contour.py:261–268  ·  view source on GitHub ↗

Utility function for _contour_trace Contours with an area of the order as 1 pixel are considered spurious.

(x, y)

Source from the content-addressed store, hash-verified

259
260
261def _is_invalid_contour(x, y):
262 """
263 Utility function for _contour_trace
264
265 Contours with an area of the order as 1 pixel are considered spurious.
266 """
267 too_small = np.all(np.abs(x - x[0]) < 2) and np.all(np.abs(y - y[0]) < 2)
268 return too_small
269
270
271def _extract_contours(im, values, colors):

Callers 1

_contour_traceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected