colour.plotting.plot_thin_film_comparison#
- colour.plotting.plot_thin_film_comparison(configurations: Sequence[Dict[str, Any]], shape: SpectralShape = SPECTRAL_SHAPE_DEFAULT, polarisation: Literal['S', 'P', 'Both'] | str = 'Both', **kwargs: Any) Tuple[Figure, Axes][source]#
Plot comparison of multiple thin film configurations.
- Parameters:
configurations (Sequence[Dict[str, Any]]) –
List of dictionaries, each containing parameters for a thin film configuration.
Single layer:
{'type': 'single', 'n_film': float, 't': float, 'n_substrate': float, 'label': str}Multilayer:
{'type': 'multilayer', 'refractive_indices': array, 't': array, 'n_substrate': float, 'label': str}
shape (SpectralShape) – Spectral shape for wavelength sampling.
polarisation (Literal['S', 'P', 'Both'] | str) – Polarisation to plot: ‘S’, ‘P’, or ‘Both’ (case-insensitive).
kwargs (Any) – {
colour.plotting.artist(),colour.plotting.render()}, See the documentation of the previously listed definitions.
- Returns:
Current figure and axes.
- Return type:
Examples
>>> configurations = [ ... { ... "type": "single", ... "n_film": 1.46, ... "t": 100, ... "n_substrate": 1.5, ... "label": "MgF2 100nm", ... }, ... { ... "type": "single", ... "n_film": 2.4, ... "t": 25, ... "n_substrate": 1.5, ... "label": "TiO2 25nm", ... }, ... ] >>> plot_thin_film_comparison(configurations) (<Figure size ... with 1 Axes>, <...Axes...>)