Function
colorbar
(mappable=None, cax=None, ax=None, **kw)
Source from the content-addressed store, hash-verified
| 2087 | |
| 2088 | |
| 2089 | def 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 |
| 2102 | colorbar.__doc__ = matplotlib.colorbar.colorbar_doc |
| 2103 | |
| 2104 | |
Callers
nothing calls this directly
Tested by
no test coverage detected