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

Method grid2mask

lib/matplotlib/streamplot.py:338–340  ·  view source on GitHub ↗

Return nearest space in mask-coords from given grid-coords.

(self, xi, yi)

Source from the content-addressed store, hash-verified

336 self.y_data2grid = 1. / grid.dy
337
338 def grid2mask(self, xi, yi):
339 """Return nearest space in mask-coords from given grid-coords."""
340 return round(xi * self.x_grid2mask), round(yi * self.y_grid2mask)
341
342 def mask2grid(self, xm, ym):
343 return xm * self.x_mask2grid, ym * self.y_mask2grid

Callers 3

start_trajectoryMethod · 0.95
reset_start_pointMethod · 0.95
update_trajectoryMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected