plot_rays¶
- marxs.visualization.threejsjson.plot_rays(data, scalar=None, prop={}, name='Photon list', cmap=None)[source] [edit on github]¶
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 Eukledian position vector.
- scalarNone or nd.array of shape (n,) or (n, N)
This quantity is used to color the rays. If
None
all rays will have the same color. If it has n elements, each ray will have exactly one color (e.g. color according to the energy of the ray), if it has n*N elements, rays will be multicolored.- propdict
keyword arguments for line material.
- namestring
Identifier “name” for three.js objects. This only matters if your website identifies elements by name for interactive features.
- cmap
matplotlib.colors.Colormap
instance or string or None matplotlib
color maps are used to convertscalar
values to rgb colors. IfNone
the default matplotlib colormap will be used, otherwise the colormap can be specified in this keyword.