本文简要介绍 python 语言中 matplotlib.cm.register_cmap
的用法。
-
[
Deprecated
] 将颜色图添加到get_cmap()
识别的集合中。注册要按名称访问的新颜色图
LinearSegmentedColormap('swirly', data, lut) register_cmap(cmap=swirly_cmap)
- 参数:
- name str,可选
-
可在
get_cmap()
或rcParams["image.cmap"]
中使用的名称(默认值:'viridis'
)如果不存在,则名称将是
cmap
的name
属性。 - cmap matplotlib.colors.Colormap
-
尽管是第二个参数并具有默认值,但这是一个必需的参数。
- override_builtin bool
-
允许用户提供的颜色图覆盖内置颜色图。
除非您确定需要它,否则请不要使用它。
注意
自 3.7 版起已弃用:采用
matplotlib.colormaps.register(name)
反而。
用法
matplotlib.cm.register_cmap(name=None, cmap=None, *, override_builtin=False)
相关用法
- Python matplotlib rename_parameter用法及代码示例
- Python matplotlib relativedelta用法及代码示例
- Python matplotlib rc用法及代码示例
- Python matplotlib rgrids用法及代码示例
- Python matplotlib rc_context用法及代码示例
- Python matplotlib axvspan用法及代码示例
- Python matplotlib Axes.get_legend_handles_labels用法及代码示例
- Python matplotlib AbstractMovieWriter用法及代码示例
- Python matplotlib triplot用法及代码示例
- Python matplotlib StarPolygonCollection.set_hatch用法及代码示例
- Python matplotlib Axes.hist用法及代码示例
- Python matplotlib boxplot用法及代码示例
- Python matplotlib subplots用法及代码示例
- Python matplotlib InsetPosition用法及代码示例
- Python matplotlib ToolManager.toolmanager_disconnect用法及代码示例
- Python matplotlib Figure.set_size_inches用法及代码示例
- Python matplotlib figlegend用法及代码示例
- Python matplotlib Axes.step用法及代码示例
- Python matplotlib Axes.contour用法及代码示例
- Python matplotlib LassoSelector用法及代码示例
- Python matplotlib BrokenBarHCollection.set_hatch用法及代码示例
- Python matplotlib Axes.plot用法及代码示例
- Python matplotlib Axes.semilogx用法及代码示例
- Python matplotlib Axes.semilogy用法及代码示例
- Python matplotlib MovieWriterRegistry.register用法及代码示例
注:本文由纯净天空筛选整理自skytowner.com大神的英文原创作品 matplotlib.cm.register_cmap。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。