clear -all
Clears all spectra. On completion all channels of all spectra will be zero.
clear spec1 ?spec2...?
Clears all spectra named spectra.
clear -id id1 ?id2...?
Clears all spectra whose numeric ids are listed by the command. Spectra have both names and numeric ids.
Example 4. Clearing spectra whose names match a glob pattern r*
foreach spectrum [spectrum -list r*] { clear -id [lindex $spectrum 0] }
Note that this is not directly supported by the clear command but the little script above achieves that. An exercise for the reader is to modify the script so that instead of clear -id, spectra are cleared by name.