MCPcopy Create free account
hub / github.com/ColdGrub1384/Pyto / grid2mask

Method grid2mask

site-packages/matplotlib/streamplot.py:270–273  ·  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

268 self.y_data2grid = 1. / grid.dy
269
270 def grid2mask(self, xi, yi):
271 """Return nearest space in mask-coords from given grid-coords."""
272 return (int((xi * self.x_grid2mask) + 0.5),
273 int((yi * self.y_grid2mask) + 0.5))
274
275 def mask2grid(self, xm, ym):
276 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