本文簡要介紹 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。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
