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

Method resolve

lib/matplotlib/colors.py:3376–3385  ·  view source on GitHub ↗
(norm)

Source from the content-addressed store, hash-verified

3374 raise ValueError("MultiNorm must be assigned at least one norm")
3375
3376 def resolve(norm):
3377 if isinstance(norm, str):
3378 scale_cls = _api.getitem_checked(scale._scale_mapping, norm=norm)
3379 return mpl.colorizer._auto_norm_from_scale(scale_cls)()
3380 elif isinstance(norm, Normalize):
3381 return norm
3382 else:
3383 raise ValueError(
3384 "Each norm assigned to MultiNorm must be "
3385 f"of type `str`, or `Normalize`, not {type(norm)}")
3386
3387 self._norms = tuple(resolve(norm) for norm in norms)
3388

Callers 15

boilerplate.pyFile · 0.80
mainFunction · 0.80
mainFunction · 0.80
setupMethod · 0.80
setupMethod · 0.80
_get_versionFunction · 0.80
_get_config_or_cache_dirFunction · 0.80
_convert_psfragsFunction · 0.80
test_use_urlFunction · 0.80
test_mathtext_fallbackFunction · 0.80
test_load_from_urlFunction · 0.80

Calls

no outgoing calls

Tested by 3

test_use_urlFunction · 0.64
test_mathtext_fallbackFunction · 0.64
test_load_from_urlFunction · 0.64