plot_rays

marxs.visualization.x3d.plot_rays(data, scalar=None, *, scene=None, cmap=<matplotlib.colors.ListedColormap object>, normalize_kwargs={})[source]

Plot lines for simulated rays.

Parameters

datanp.array of shape(n, N, 3)

where n is the number of rays, N the number of positions per ray and the last dimension is the (x,y,z) of an Euclidean position vector.

scalarNone or nd.array of shape (n,) or (n, N)

Scalar quantity that is used to color the rays.

scenemarxs.visualization.x3d.Scene object

A scene that rays are added to. If None, a new scene will be created.

cmapmatplotlib colormap

Colormap to use for mapping the scalar quantity to colors.

normalize_kwargsdict

Keyword arguments for the normalization of the scalar quantity see matplotlib.colors.Normalize for accepted keywords.

Returns

scenemarxs.visualization.x3d.Scene object

Scene with object added.