Plot3d#

Plotting routines for 3d display of data.

Note

This module is using vispy.

add_axes(view)[source]#

Add axes to a plot.

Arguments

viewview

The vispy window.

Returns

viewview

The vispy view of the plot.

center_view(view)[source]#

Center the camera in a plot.

Arguments

viewview

The vispy window.

Returns

viewview

The vispy view of the plot.

get_view(view)[source]#

Return the view of the argument.

Arguments

viewview

The vispy window.

Returns

viewview

The vispy view of the plot.

get_view_parameter(view)[source]#
grays_alpha(alpha=0.075, inverse=False)[source]#
initialize_view(view=None, title=None, show=True, fov=None, distance=None, elevation=None, azimuth=None, center=None, depth_value=None, bg_color='white')[source]#

Return a default view.

list_line_plot_3d(coordinates, view=None, title=None, center_view=True, **kwargs)[source]#

Plot lines between coordinates in 3d.

Arguments

coordinatesarray

Coordinate nx3 array.

titlestr or None

Window title.

viewview or None

Add plot to this view. if given.

Returns

viewview

The view of the plot.

list_plot_3d(coordinates, view=None, title=None, center_view=True, color=None, **kwargs)[source]#

Scatter plot of points in 3d.

Arguments

coordinatesarray

Coordinatenx3 array.

titlestr or None

Window title.

viewview or None

Add plot to this view. if given.

Returns

viewview

The view of the plot.

plot_3d(source, colormap=None, view=None, title=None, center_view=True, **kwargs)[source]#

Plot 3d volume.

Arguments

sourcearray

The 3d volume.

titlestr or None

Window title.

viewview or None

Add plot to this view. if given.

Returns

viewview

The view of the plot.

plot_box(lower, upper, face_color=(1, 0, 0, 0.5), line_color=None, line_width=1, line_padding=0, shading='smooth', mode='triangles', title=None, view=None, center_view=True, **kwargs)[source]#

Plots a box in 3d.

plot_mesh_3d(coordinates, faces, view=None, shading='smooth', color=None, face_colors=None, vertex_colors=None, mode='triangles', center_view=True, title=None, **kwargs)[source]#

Plot a 3d mesh.

Arguments

coordinatesarray

Coordinate nx3 array.

facesarray

Indices of triangular faces, nx3 array.

titlestr or None

Window title.

viewview or None

Add plot to this view. if given.

Returns

viewview

The view of the plot.

plot_regular_polygon(center, sides=4, title=None, view=None, color='red', border_color=None, border_width=1, radius=1.0, **kwargs)[source]#
save(location, view, transparent=None, *args, **kwargs)[source]#

Save the current view to a file.

set_background(view, color)[source]#

Set the background color of the view.

Arguments

viewview

The vispy window.

colorcolor specification

The color for the background.

Returns

viewview

The vispy view of the plot.

set_light_to_camera(mesh)[source]#

Set the light direction to the crrent camera position.

Arguments

meshmesh

A vispy mesh.

set_view_parameter(view, parameter)[source]#
single_color_colormap(color=(1, 1, 1), alpha=0.075, inverse_alpha=False)[source]#