pyvista.AxesAssemblySymmetric#
- class AxesAssemblySymmetric(*args, **kwargs)[ソース]#
Symmetric assembly of arrow-style axes parts.
This class is similar to
AxesAssemblybut the axes are symmetric.The axes may be used as a widget or added to a scene.
- パラメータ:
- x_label
str, default: ('+X', '-X') Text labels for the positive and negative x-axis. Specify two strings or a single string. If a single string, plus
'+'and minus'-'characters are added. Alternatively, set the labels withlabels.- y_label
str, default: ('+Y', '-Y') Text labels for the positive and negative y-axis. Specify two strings or a single string. If a single string, plus
'+'and minus'-'characters are added. Alternatively, set the labels withlabels.- z_label
str, default: ('+Z', '-Z') Text labels for the positive and negative z-axis. Specify two strings or a single string. If a single string, plus
'+'and minus'-'characters are added. Alternatively, set the labels withlabels.- labels
Sequence[str],optional Text labels for the axes. Specify three strings, one for each axis, or six strings, one for each +/- axis. If three strings plus
'+'and minus'-'characters are added. This is an alternative parameter to usingx_label,y_label, andz_labelseparately.- label_color
ColorLike, default: 'black' Color of the text labels.
- show_labelsbool, default:
True Show or hide the text labels.
- label_position
float|VectorLike[float],optional Position of the text labels along each axis. By default, the labels are positioned at the ends of the shafts.
- label_size
int, default: 50 Size of the text labels.
- x_color
ColorLike|Sequence[ColorLike],optional Color of the x-axis shaft and tip.
- y_color
ColorLike|Sequence[ColorLike],optional Color of the y-axis shaft and tip.
- z_color
ColorLike|Sequence[ColorLike],optional Color of the z-axis shaft and tip.
- position
VectorLike[float], default: (0.0, 0.0, 0.0) Position of the axes in space.
- orientation
VectorLike[float], default: (0, 0, 0) Orientation angles of the axes which define rotations about the world's x-y-z axes. The angles are specified in degrees and in x-y-z order. However, the actual rotations are applied in the around the y-axis first, then the x-axis, and finally the z-axis.
- origin
VectorLike[float], default: (0.0, 0.0, 0.0) Origin of the axes. This is the point about which all rotations take place. The rotations are defined by the
orientation.- scale
VectorLike[float], default: (1.0, 1.0, 1.0) Scaling factor applied to the axes.
- user_matrix
MatrixLike[float],optional 軸に適用される4x4の変換行列です。デフォルトは単位行列です。 ユーザ行列は、アクターに適用される最後の変換です。
- name
str,optional The name of this assembly used when tracking on a plotter.
Added in version 0.45.
- **kwargs
Keyword arguments passed to
pyvista.AxesGeometrySource.
- x_label
参考
AxesAssembly- 軸オブジェクト
異なる軸のオブジェクトを示す例です。
例
Add symmetric axes to a plot.
>>> import pyvista as pv >>> axes_assembly = pv.AxesAssemblySymmetric() >>> pl = pv.Plotter() >>> _ = pl.add_actor(axes_assembly) >>> pl.show()
Customize the axes labels.
>>> axes_assembly.labels = [ ... 'east', ... 'west', ... 'north', ... 'south', ... 'up', ... 'down', ... ] >>> axes_assembly.label_color = 'darkgoldenrod'
>>> pl = pv.Plotter() >>> _ = pl.add_actor(axes_assembly) >>> pl.show()
Add the axes as a custom orientation widget with
add_orientation_widget(). We also configure the labels to only show text for the positive axes.>>> axes_assembly = pv.AxesAssemblySymmetric( ... x_label=('X', ''), y_label=('Y', ''), z_label=('Z', '') ... ) >>> pl = pv.Plotter() >>> _ = pl.add_mesh(pv.Cone()) >>> _ = pl.add_orientation_widget( ... axes_assembly, ... viewport=(0, 0, 0.5, 0.5), ... ) >>> pl.show()
メソッド
アトリビュート
Return or set the axes labels.
Return or set the labels for the positive and negative x-axis.
Return or set the labels for the positive and negative y-axis.
Return or set the labels for the positive and negative z-axis.