plot_filters¶
- speclite.filters.plot_filters(responses, wavelength_unit=None, wavelength_limits=None, wavelength_scale='linear', legend_loc='upper right', legend_ncols=1, response_limits=None, cmap='nipy_spectral')[source] [edit on github]¶
Plot one or more filter response curves.
The matplotlib package must be installed to use this function. The
show <matplotlib.pylot.show()
method is not called after creating the plot to allow convenient customization and saving. As a result, you will normally need to call this method yourself.- Parameters:
- responses
FilterSequence
The sequence of filters to plot, normally obtained by calling
load_filters()
.- wavelength_unit
astropy.units.Unit
Convert values along the wavelength axis to the specified unit, or leave them as
default_wavelength_unit
if this parameter is None.- wavelength_limitstuple or None
Plot limits to use on the wavelength axis, or select limits automatically if this parameter is None. Units are optional.
- wavelength_scalestr
Scaling to use for the wavelength axis. See
matplotlib.pyplot.yscale()
for details.- legend_locstr
Location of the legend to plot, or do not display any legend if this value is None. See
matplotlib.pyplot.legend()
for details.- legend_ncolsint
Number of legend columns. Default is 1.
- response_limitstuple or None
Plot limits to use on the response axis, or select limits automatically if this parameter is None.
- cmapstr or
matplotlib.colors.Colormap
Color map to use for plotting each filter band. Colors are assigned based on each band’s effective wavelength, so a spectral color map (from blue to red) will give nice results.
- responses