本文簡要介紹 python 語言中 matplotlib.colors.ColorSequenceRegistry
的用法。
-
基礎:
Mapping
Matplotlib 已知顏色序列的容器。
通用注冊表實例是
matplotlib.color_sequences
。用戶不需要自己實例化ColorSequenceRegistry
。讀取訪問使用類似字典的接口將名稱映射到顏色列表:
import matplotlib as mpl cmap = mpl.color_sequences['tab10']
返回的列表是副本,因此它們的修改不會更改顏色序列的全局定義。
可以通過
ColorSequenceRegistry.register
添加其他顏色序列:mpl.color_sequences.register('rgb', ['r', 'g', 'b'])
用法
class matplotlib.colors.ColorSequenceRegistry
相關用法
- Python matplotlib ColormapRegistry用法及代碼示例
- Python matplotlib Collection.sticky_edges用法及代碼示例
- Python matplotlib Collection.set_hatch用法及代碼示例
- Python matplotlib ConnectionStyle用法及代碼示例
- Python matplotlib ConciseDateFormatter用法及代碼示例
- Python matplotlib CircleCollection.set_hatch用法及代碼示例
- Python matplotlib CircleCollection.sticky_edges用法及代碼示例
- Python matplotlib CenteredNorm用法及代碼示例
- Python matplotlib CallbackRegistry用法及代碼示例
- 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用法及代碼示例
注:本文由純淨天空篩選整理自skytowner.com大神的英文原創作品 matplotlib.colors.ColorSequenceRegistry。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。