pyvista.TextProperty#
- class TextProperty(*args, **kwargs)[ソース]#
テキストのプロパティを定義します.
- パラメータ:
- theme
pyvista.plotting.themes.Theme,optional Plot固有のテーマ.
- color
pyvista.ColorLike,optional 文字列,RGBリスト,または16進カラー文字列.例:
color='white',color='w',color=[1.0, 1.0, 1.0],color='#FFFFFF'.スカラーが指定されている場合,色は上書きされます.- font_family
str|None,optional フォントファミリーまたは None .
- orientation
float,optional テキストの向き(度単位).
- font_size
int,optional フォントサイズ.
- font_file
str,optional フォントファイルのパス.
- shadowbool,
optional 影が有効か.
- justification_horizontal
str,optional テキストの水平方向の両端揃え. "left", "center", "right" のいずれかでなければなりません.
- justification_vertical
str,optional テキストの垂直方向の両端揃え. "bottom", "center", "top" のいずれかでなければなりません.
- italicbool, default:
False タイトルとバーのラベルを斜体にします.
- boldbool, default:
True タイトルとバーのラベルを太字にします.
- background_color
pyvista.Color,optional テキストの背景色.
- background_opacity
pyvista.Color,optional テキストの背景不透明度.
- theme
例
テキストのプロパティを作成します.
>>> from pyvista import TextProperty >>> prop = TextProperty() >>> prop.opacity = 0.5 >>> prop.background_color = 'b' >>> prop.background_opacity = 0.5 >>> prop.show_frame = True >>> prop.frame_color = 'b' >>> prop.frame_width = 10 >>> prop.frame_color Color(name='blue', hex='#0000ffff', opacity=255)
メソッド
影を有効にします.
TextProperty.set_font_file(font_file)フォントファイルを設定します.
TextProperty.shallow_copy(to_copy)テキストのプロパティの浅いコピーを作成します。
アトリビュート
テキストのプロパティの背景色.
テキストのプロパティの背景不透明度.
テキストのプロパティの太字.
テキストのプロパティの色.
フォントファミリー.
フォントサイズ.
テキストプロパティのフレーム色.
フレームの幅.
テキストのイタリック体.
テキストの水平方向の両端揃え.
テキストの垂直揃え.
テキストのプロパティの不透明度.
テキストの向き(度単位).
フレームの表示.