本文簡要介紹 python 語言中 matplotlib.colors.make_norm_from_scale
的用法。
-
用於從
ScaleBase
子類構建Normalize
子類的裝飾器。後
@make_norm_from_scale(scale_cls) class norm_cls(Normalize): ...
norm_cls
填充了方法,以便將規範化計算轉發到scale_cls
(即,scale_cls
是用於使用norm_cls
規範化的可映射的顏色條的比例)。如果沒有傳遞
init
,那麽norm_cls
的構造函數簽名將是norm_cls(vmin=None, vmax=None, clip=False)
;這三個參數將被轉發到基類(Normalize.__init__
),並且scale_cls
對象將在沒有參數的情況下初始化(除了虛擬軸)。如果
scale_cls
構造函數采用其他參數,則應將init
傳遞給make_norm_from_scale
。它是一個可調用的,其簽名使用only
。首先,這個簽名將成為norm_cls
的簽名。其次,norm_cls
構造函數將使用此簽名綁定傳遞給它的參數,提取綁定的vmin
、vmax
和clip
值,將這些值傳遞給Normalize.__init__
,並轉發剩餘的綁定值(包括簽名定義的任何默認值)到scale_cls
構造函數。
用法
matplotlib.colors.make_norm_from_scale(scale_cls, base_norm_cls=None, *, init=None)
相關用法
- 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用法及代碼示例
- Python matplotlib PolyQuadMesh.set_hatch用法及代碼示例
- Python matplotlib warn_deprecated用法及代碼示例
- Python matplotlib Text.set_bbox用法及代碼示例
- Python matplotlib Axes.inset_axes用法及代碼示例
- Python matplotlib delete_parameter用法及代碼示例
注:本文由純淨天空篩選整理自skytowner.com大神的英文原創作品 matplotlib.colors.make_norm_from_scale。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。