MCPcopy Create free account
hub / github.com/cselab/aphros / PlotFieldText

Function PlotFieldText

deploy/scripts/aphros/plot.py:301–312  ·  view source on GitHub ↗
(ax, field, meta, skip_values=[], fmt="{:.2g}")

Source from the content-addressed store, hash-verified

299 cmap=None)
300
301def PlotFieldText(ax, field, meta, skip_values=[], fmt="{:.2g}"):
302 for ix, iy in np.ndindex(field.shape):
303 value = field[ix, iy]
304 if value in skip_values:
305 continue
306 ax.text(
307 meta.x1c[ix],
308 meta.y1c[iy],
309 fmt.format(value),
310 horizontalalignment='center',
311 verticalalignment='center',
312 )
313
314
315# u: 2d numpy array

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected