MCPcopy Create free account
hub / github.com/danjgale/surfplot / _find_color_range

Function _find_color_range

surfplot/plotting.py:123–131  ·  view source on GitHub ↗

Find min and max of both hemispheres

(v)

Source from the content-addressed store, hash-verified

121
122
123def _find_color_range(v):
124 """Find min and max of both hemispheres"""
125 hemis = ['left', 'right']
126 with warnings.catch_warnings():
127 # not necessary to warn the user about this. NaNs won't impact anything
128 warnings.filterwarnings('ignore', r'All-NaN (slice|axis) encountered')
129 vmin = np.nanmin([np.nanmin(v[h]) for h in hemis if h in v])
130 vmax = np.nanmax([np.nanmax(v[h]) for h in hemis if h in v])
131 return vmin, vmax
132
133
134def _set_label_positions(location, rotation):

Callers 1

add_layerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected