Plot Window Control#

squap.make_3D(row=0, col=0)[source]#

Removes the current plot widget at row row and column col and adds a 3D plot widget. When you aren’t making use of subplots, the defaults replace the main widget.

Parameters:
  • row (int, optional) – Row of the replaced widget. Defaults to 0.

  • col (int, optional) – Column of the replaced widget. Defaults to 0.

Returns:

The created 3D plot widget.

Return type:

SubplotWidget3D

squap.set_camera(
x_offset=None,
y_offset=None,
z_offset=None,
distance=None,
azimuth=None,
elevation=None,
fov=None,
)[source]#

Sets the camera offset, distance, rotation and fov using the given arguments. distance, azimuth and elevation act like polar coordinates around the origin, and x_offset, y_offset and z_offset determine the position of this origin. Use squap.align_camera() to experiment with these values and find the correct ones.

Parameters:
  • x_offset (float, optional) – New x offset of the origin.

  • y_offset (float, optional) – New y offset of the origin.

  • z_offset (float, optional) – New z offset of the origin.

  • distance (float, optional) – New distance between the camera position and the origin.

  • azimuth (float, optional) – Angle of rotation horizontally around the origin.

  • elevation (float, optional) – Angle of rotation vertically about the origin.

  • fov (float, optional) – Field of view.

squap.align_camera(ax=None, tab=None)[source]#

Adjusts camera position of a 3D plot. Use this to find the correct parameters to set the desired initial camera position with squap.set_camera().

Parameters:
  • ax (SubplotWidget3D, optional) – Specifies the plot which the control boxes control. Defaults to the main plot.

  • tab (InputTable or str, optional) – The tab to which to add the control boxes, or a string that represents the name of the newly created tab which the control boxes will be added to. Defaults to the main input table.

squap.set_zoom_rate_3D(new_rate=1.003)[source]#

Sets the rate at which you zoom when the plot is zoomed after it has been created. Starts off at 1.003.