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

Function colorbar

site-packages/matplotlib/pyplot.py:2089–2101  ·  view source on GitHub ↗
(mappable=None, cax=None, ax=None, **kw)

Source from the content-addressed store, hash-verified

2087
2088
2089def colorbar(mappable=None, cax=None, ax=None, **kw):
2090 if mappable is None:
2091 mappable = gci()
2092 if mappable is None:
2093 raise RuntimeError('No mappable was found to use for colorbar '
2094 'creation. First define a mappable such as '
2095 'an image (with imshow) or a contour set ('
2096 'with contourf).')
2097 if ax is None:
2098 ax = gca()
2099
2100 ret = gcf().colorbar(mappable, cax = cax, ax=ax, **kw)
2101 return ret
2102colorbar.__doc__ = matplotlib.colorbar.colorbar_doc
2103
2104

Callers

nothing calls this directly

Calls 4

gciFunction · 0.85
gcaFunction · 0.85
gcfFunction · 0.85
colorbarMethod · 0.45

Tested by

no test coverage detected