cigvis.vispynodes.axis3d module#
- class cigvis.vispynodes.axis3d.Axis3D(shape, mode='box', axis_pos=[3, 3, 1], tick_nums=7, ticks_font_size=18, labels_font_size=20, intervals=[1, 1, 1], starts=[0, 0, 0], samplings=None, axis_labels=['Inline', 'Xline', 'Time'], line_width=3, ticks_length=4, expand=1, color='black', ticks_color=(0.3, 0.3, 0.3), rotation=(0, 0, -90))#
Bases:
Compound3D axis with ticks and labels.
Parameters#
- shapetuple
The bound of the 3D world
- modestr
The mode of the axis, ‘box’ or ‘axis’
- tick_numsint
The number of ticks on each axis
- ticks_font_sizeint
The font size of the ticks
- labels_font_sizeint
The font size of the labels
- intervalslist
The sample intervals of the axis
- startslist
The first sample of the axis
- samplingslist[np.ndarray]
The sample points of the axis, default is None
- axis_poslist
Which axis to show ticks? For each axis, it can be 0, 1, 2, 3, representing the starting point of the ticks along the axis. 0: For ‘x’ axis -> (0, 0, 0), for ‘y’ axis -> (0, 0, 0), for ‘z’ axis -> (0, 0, 0) 1: For ‘x’ axis -> (0, 0, nz), for ‘y’ axis -> (0, 0, nz), for ‘z’ axis -> (0, ny, 0) 2: For ‘x’ axis -> (0, ny, 0), for ‘y’ axis -> (nx, 0, 0), for ‘z’ axis -> (nx, 0, 0) 3: For ‘x’ axis -> (0, ny, nz), for ‘y’ axis -> (nx, 0, nz), for ‘z’ axis -> (nx, ny, 0)
- axis_labelslist
The labels of the axis
- line_widthint
The width of the axis line
- ticks_lengthint
The length of each tick
- expandint
The expand of the axis
- colorstr
The color of the axis
- ticks_colortuple
The color of the ticks
- rotationlist
The rotation of the axis labels
- get_line(axis, tick_start)#
- get_ticks(length, num=7)#
get ticks for axis, num is the number of ticks
- update_axis()#
- update_axis_labels(axis_labels)#
- update_ticks_labels()#
- update_ticks_pos(axis_pos=None, axis=None, tick_start=None)#
Updates the tick positions on a specified axis in a 3D scene.
Parameters#
axis (str): The axis on which to update the ticks. Should be one of ‘x’, ‘y’, or ‘z’.
- tick_start (int): An integer representing the starting point of the ticks along the axis.
The tick_start corresponds to the following start points: 0: For ‘x’ axis -> (0, 0, 0), for ‘y’ axis -> (0, 0, 0), for ‘z’ axis -> (0, 0, 0) 1: For ‘x’ axis -> (0, 0, nz), for ‘y’ axis -> (0, 0, nz), for ‘z’ axis -> (0, ny, 0) 2: For ‘x’ axis -> (0, ny, 0), for ‘y’ axis -> (nx, 0, 0), for ‘z’ axis -> (nx, 0, 0) 3: For ‘x’ axis -> (0, ny, nz), for ‘y’ axis -> (nx, 0, nz), for ‘z’ axis -> (nx, ny, 0)