dreye.ReceptorEstimator.simplex_plot#

ReceptorEstimator.simplex_plot(B=None, domain=None, ax=None, cmap='rainbow', gradient_line_kws=None, point_scatter_kws=None, hull_kws=None, impure_lines=False, add_center=True, add_grid=False, add_hull=True, relative=True, domain_line=True, labels=None, label_size=16, scalar_gradient_line=1, cmap_B=None, rescale=False, transform=None, label_kws={}, **kwargs)[source]#

Plot the simplex plot (aka chromaticity diagram) of all filter types. This function only works for two, three, and four filter types (i.e. 1 < n_filters < 5).

Parameters:
Bndarray of shape (n_samples, n_filters)

Relative total capture points. If None, the registered B is used. Defaults to None.

domainndarray, optional

Domain points to plot as a spectrally colored line, by default None

axmatplotlib.axes.Axes, optional

Pre-existing axes for the plot. Otherwise, call matplotlib.pyplot.gca() internally.

cmapstr, optional

Color map used for the gradient colored line, by default ‘rainbow’.

gradient_line_kwsdict, optional

Other keyword arguments passed to the matplotlib.axes.Axes.plot() function for the spectrally colored domain line. By default None.

point_scatter_kwsdict, optional

Other keyword arguments passed to the matplotlib.axes.Axes.scatter() function for center points. By default None.

hull_kwsdict, optional

Other keyword arguments passed to the matplotlib.axes.Axes.plot() function for the system’s hull. By default None.

impure_linesbool, optional

Plot the lines that connect non-adjacent filter function. In color science, these are usually colored non-spectral color lines. By default False.

add_centerbool, optional

Add the center (adapted) point, by default True.

add_gridbool, optional

Add an orientation grid that connects the center with the edges of the simplex, by default False.

add_hullbool, optional

Add the system’s hull to the plot, by default True.

relativebool, optional

Whether to plot using the relative capture values, by default True.

domain_linebool, optional

Whether to plot the spectrally colored domain line, by default True.

labelsndarray of shape (n_filters), optional

Labels for the edges of the simplex. That is the labels of the filters. By default None.

label_sizeint, optional

The size of each label, by default 16.

scalar_gradient_linefloat, optional

Scalar used to scale the gradient line before calculating the relative capture of the single wavelength gradient line.

cmap_Bstr, optional

Colormap used for the B scatter points.

rescalebool, optional

Whether to rescale the corners to fill out the tetrahedron according to the optimal wavelength line.

transformcallable, optional

Function to apply to B and single wavelength line.

kwargskey, value mappings

Other keyword arguments are passed down to matplotlib.axes.Axes.scatter() for the B points.

Returns:
matplotlib.axes.Axes, optional

The matplotlib axes containing the plot.