當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


Python matplotlib FancyBboxPatch.set_boxstyle用法及代碼示例

本文簡要介紹 python 語言中 matplotlib.patches.FancyBboxPatch.set_boxstyle 的用法。

用法

set_boxstyle(boxstyle=None, **kwargs)

設置框樣式,可能還有更多屬性。

以前的框樣式的屬性不會被重用。

如果沒有參數(或使用 boxstyle=None ),可用的框樣式將作為人類可讀的字符串返回。

參數
boxstyle str 或 BoxStyle

框的樣式: 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=無

**kwargs

框樣式的附加屬性。有關支持的參數,請參見上表。

例子

set_boxstyle("Round,pad=0.2")
set_boxstyle("round", pad=0.2)

相關用法


注:本文由純淨天空篩選整理自skytowner.com大神的英文原創作品 matplotlib.patches.FancyBboxPatch.set_boxstyle。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。