View source: R/sparse-spectrum.R
set_labels | R Documentation |
Adds labels to an object, typically for plotting purposes.
set_labels(x, labels)
## S3 method for class 'sparse_spectrum'
set_labels(x, labels)
x |
Object. |
labels |
Character vector of labels to add to the object. In the case of sparse spectra, there should be one label for each partial. |
The original object, with labels added.
spectrum <- sparse_pi_spectrum("60 64 67", num_harmonics = 1)
labels <- as.character(c(1, 2, 3))
spectrum_with_labels <- set_labels(spectrum, labels)
plot(spectrum_with_labels)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.