pyvista.Renderer.add_axes#
- Renderer.add_axes(
- interactive=None,
- line_width=2,
- color=None,
- x_color=None,
- y_color=None,
- z_color=None,
- xlabel='X',
- ylabel='Y',
- zlabel='Z',
- labels_off=False,
- box=None,
- box_args=None,
- viewport=(0, 0, 0.2, 0.2),
- **kwargs,
左下隅にインタラクティブ軸ウィジェットを追加します.
- パラメータ:
- interactivebool,
optional
この方向ウィジェットをユーザが移動できるようにします.
- line_width
int
, default: 2 マーカーラインの幅.
- color
ColorLike
,optional
ラベルの色.
- x_color
ColorLike
,optional
Color used for the x-axis arrow. Defaults to theme axes parameters.
- y_color
ColorLike
,optional
Color used for the y-axis arrow. Defaults to theme axes parameters.
- z_color
ColorLike
,optional
Color used for the z-axis arrow. Defaults to theme axes parameters.
- xlabel
str
, default: "X" Text used for the x-axis.
- ylabel
str
, default: "Y" Text used for the y-axis.
- zlabel
str
, default: "Z" Text used for the z-axis.
- labels_offbool, default:
False
軸のテキストラベルを有効または無効にします.
- boxbool,
optional
ボックス方向マーカーを表示します.
box_args
で調整してください.詳細はpyvista.create_axes_orientation_box()
を参照してください.バージョン 0.43.0 で非推奨: 非推奨。代わりに add_box_axes メソッドを使用してください。
- box_args
dict
,optional
box=True
の場合のオリエンテーションボックスウィジェットのパラメータです.pyvista.create_axes_orientation_box()
のパラメータを参照してください.- viewportsequence[
float
], default: (0, 0, 0.2, 0.2) ウィジェットのビューポート
(xstart, ystart, xend, yend)
です.- **kwargs
dict
,optional
オリエンテーションマーカーウィジェットのパラメータを渡すのに使用されます.
pyvista.create_axes_marker()
のパラメータを参照してください.
- interactivebool,
- 戻り値:
AxesActor
Axes actor of the added widget.
参考
show_axes
Similar method which calls
add_axes()
without any parameters.add_axes_at_origin
Add an
pyvista.AxesActor
to the origin of a scene.
例
ラベルのない,太い線で軸を表示します.
>>> import pyvista as pv >>> pl = pv.Plotter() >>> actor = pl.add_mesh(pv.Box(), show_edges=True) >>> _ = pl.add_axes(line_width=5, labels_off=True) >>> pl.show()
軸マーカのパラメータをさらに細かく指定します.
>>> import pyvista as pv >>> pl = pv.Plotter() >>> actor = pl.add_mesh(pv.Box(), show_edges=True) >>> _ = pl.add_axes( ... line_width=5, ... cone_radius=0.6, ... shaft_length=0.7, ... tip_length=0.3, ... ambient=0.5, ... label_size=(0.4, 0.16), ... ) >>> pl.show()