本文簡要介紹 python 語言中 matplotlib.collections.PolyQuadMesh
的用法。
-
基礎:
_MeshData
,PolyCollection
用於將四邊形網格繪製為單獨的多邊形的類。
四邊形網格是由 M × N 個相鄰四邊形組成的網格,這些四邊形通過 (M+1, N+1) 頂點網格定義。四邊形 (m, n) 由頂點定義
(m+1, n) ----------- (m+1, n+1) / / / / / / (m, n) -------- (m, n+1)
網格不必是規則的,多邊形不必是凸的。
- 參數:
- coordinates (M+1, N+1, 2) 類似數組
-
頂點。
coordinates[m, n]
指定頂點 (m, n) 的 (x, y) 坐標。
注意
與
QuadMesh
不同,此類將每個單元格繪製為單獨的多邊形。這明顯較慢,但當想要向單元添加其他屬性(例如孵化)時,可以提供更大的靈活性。與
QuadMesh
的另一個區別是,如果單元格的任何頂點或數據被屏蔽,則不會繪製該多邊形,並且它不會出現在返回的路徑列表中。- 參數:
- verts 類似數組的列表
-
多邊形序列 [
verts0
、verts1
、 ...],其中每個元素verts_i
將多邊形i
的頂點定義為形狀 (M, 2) 的二維數組。 - sizes 類似數組,默認:無
-
多邊形縮放因子的平方。每個多邊形
verts_i
的坐標乘以sizes
中相應條目的平方根(即sizes
指定區域的縮放比例)。縮放在藝術家主變換之前應用。 - closed 布爾值,默認值:真
-
是否應通過在末尾添加 CLOSEPOLY 連接來閉合多邊形。
- **kwargs
-
轉發到
Collection
。
用法
class matplotlib.collections.PolyQuadMesh(coordinates, **kwargs)
相關用法
- Python matplotlib PolyQuadMesh.set_hatch用法及代碼示例
- Python matplotlib PolyQuadMesh.sticky_edges用法及代碼示例
- Python matplotlib PolyCollection.sticky_edges用法及代碼示例
- Python matplotlib PolyCollection.set_hatch用法及代碼示例
- Python matplotlib PathCollection.set_hatch用法及代碼示例
- Python matplotlib PatchCollection.sticky_edges用法及代碼示例
- Python matplotlib PatchCollection.set_hatch用法及代碼示例
- Python matplotlib PdfPages用法及代碼示例
- Python matplotlib PathCollection.legend_elements用法及代碼示例
- Python matplotlib PsfontsMap用法及代碼示例
- Python matplotlib PathCollection.sticky_edges用法及代碼示例
- Python matplotlib Patch.set_hatch用法及代碼示例
- Python matplotlib Patch.contains_point用法及代碼示例
- Python matplotlib PickEvent用法及代碼示例
- 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用法及代碼示例
注:本文由純淨天空篩選整理自skytowner.com大神的英文原創作品 matplotlib.collections.PolyQuadMesh。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。