This function generates an interactive Plotly plot for spectral data, allowing for the selection of plot type (absorbance or transmittance), x-axis direction, and plot geometry (points or lines).
spec_smartplotly(
.data,
wn_col = NULL,
type = c("absorbance", "transmittance"),
xdir = c("reverse", "standard"),
geom = c("point", "line"),
xmin = NULL,
xmax = NULL,
alpha = 0.8
)
A `plotly` object representing the interactive spectral plot.
A `data.frame` or `tibble` containing spectral data.
A character string specifying the column name for the wavelength or wavenumber data. Default is `"Wn"`.
A character string specifying the type of data to plot. Choices are `"absorbance"` or `"transmittance"`.
A character string specifying the direction of the x-axis. Choices are `"reverse"` for reverse direction (typically used for wavenumber) or `"standard"` for standard direction.
A character string specifying the geometry of the plot. Choices are `"point"` for a scatter plot or `"line"` for a line plot.
A numeric value specifying the minimum x-axis value for the plot. If not provided, the minimum value from the `wn_col` data will be used.
A numeric value specifying the maximum x-axis value for the plot. If not provided, the maximum value from the `wn_col` data will be used.
A numeric value specifying the transparency level of the plotted points or lines. Default is 0.8.