本文簡要介紹 python 語言中 matplotlib.patches.BoxStyle
的用法。
-
基礎:
_Style
BoxStyle
是一個容器類,它定義了幾個 boxstyle 類,用於FancyBboxPatch
。樣式對象可以創建為:
BoxStyle.Round(pad=0.2)
或者:
BoxStyle("Round", pad=0.2)
或者:
BoxStyle("Round, pad=0.2")
定義了以下 boxstyle 類。
類
名字
屬性
Square
square
填充=0.3
Circle
circle
填充=0.3
Ellipse
ellipse
填充=0.3
LArrow
larrow
填充=0.3
RArrow
rarrow
填充=0.3
DArrow
darrow
填充=0.3
Round
round
填充=0.3,rounding_size=無
Round4
round4
填充=0.3,rounding_size=無
Sawtooth
sawtooth
填充=0.3,tooth_size=無
Roundtooth
roundtooth
填充=0.3,tooth_size=無
boxstyle 類的實例是一個可調用對象,其簽名為
__call__(self, x0, y0, width, height, mutation_size) -> Path
x0
、y0
、width
和height
指定要繪製的框的位置和大小;mutation_size
縮放輪廓屬性,例如填充。返回具有給定樣式名稱的子類的實例。
-
class
圓圈(pad=0.3
)# -
基礎:
object
一個圓形盒子。
- 參數:
- pad 浮點數,默認:0.3
-
原始框周圍的填充量。
-
__稱呼__(
x0
,y0
,width
,height
,mutation_size
)# -
將 self 稱為函數。
-
class
箭頭(pad=0.3
)# -
基礎:
object
一個雙向箭頭形狀的盒子。
- 參數:
- pad 浮點數,默認:0.3
-
原始框周圍的填充量。
-
__稱呼__(
x0
,y0
,width
,height
,mutation_size
)# -
將 self 稱為函數。
-
class
橢圓(pad=0.3
)# -
基礎:
object
一個橢圓形的盒子。
3.7 版中的新函數。
- 參數:
- pad 浮點數,默認:0.3
-
原始框周圍的填充量。
-
__稱呼__(
x0
,y0
,width
,height
,mutation_size
)# -
將 self 稱為函數。
-
class
拉羅(pad=0.3
)# -
基礎:
object
left-pointing 箭頭形狀的框。
- 參數:
- pad 浮點數,默認:0.3
-
原始框周圍的填充量。
-
__稱呼__(
x0
,y0
,width
,height
,mutation_size
)# -
將 self 稱為函數。
-
class
R箭頭(pad=0.3
)# -
基礎:
LArrow
right-pointing 箭頭形狀的框。
- 參數:
- pad 浮點數,默認:0.3
-
原始框周圍的填充量。
-
__稱呼__(
x0
,y0
,width
,height
,mutation_size
)# -
將 self 稱為函數。
-
class
圓形的(pad=0.3
,rounding_size=None
)# -
基礎:
object
一個圓角的盒子。
- 參數:
- pad 浮點數,默認:0.3
-
原始框周圍的填充量。
- rounding_size 浮點數,默認:
pad
-
拐角的半徑。
-
__稱呼__(
x0
,y0
,width
,height
,mutation_size
)# -
將 self 稱為函數。
-
class
第四輪(pad=0.3
,rounding_size=None
)# -
基礎:
object
一個有圓邊的盒子。
- 參數:
- pad 浮點數,默認:0.3
-
原始框周圍的填充量。
- rounding_size 浮點數,默認:
pad
/2 -
邊倒圓。
-
__稱呼__(
x0
,y0
,width
,height
,mutation_size
)# -
將 self 稱為函數。
-
class
圓齒(pad=0.3
,tooth_size=None
)# -
基礎:
Sawtooth
帶有圓形鋸齒輪廓的盒子。
- 參數:
- pad 浮點數,默認:0.3
-
原始框周圍的填充量。
- tooth_size 浮點數,默認:
pad
/2 -
鋸齒的大小。
-
__稱呼__(
x0
,y0
,width
,height
,mutation_size
)# -
將 self 稱為函數。
-
用法
class matplotlib.patches.BoxStyle(stylename, **kwargs)
相關用法
- Python matplotlib BrokenBarHCollection.set_hatch用法及代碼示例
- Python matplotlib BrokenBarHCollection.sticky_edges用法及代碼示例
- Python matplotlib Barbs用法及代碼示例
- Python matplotlib Bbox用法及代碼示例
- 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 Axes.plot用法及代碼示例
- Python matplotlib Axes.semilogx用法及代碼示例
- Python matplotlib Axes.semilogy用法及代碼示例
- Python matplotlib MovieWriterRegistry.register用法及代碼示例
- Python matplotlib PolyQuadMesh.set_hatch用法及代碼示例
- Python matplotlib warn_deprecated用法及代碼示例
注:本文由純淨天空篩選整理自skytowner.com大神的英文原創作品 matplotlib.patches.BoxStyle。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。