This function generates a customizable plot for spectral data, allowing for the selection of plot type (absorbance or transmittance), x-axis direction, and plot geometry (points or lines).
Arguments
- .data
A `data.frame` or `tibble` containing spectral data.
- wn_col
A character string specifying the column name for the wavelength or wavenumber data. This parameter is required.
- xdir
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.
- geom
A character string specifying the geometry of the plot. Choices are `"point"` for a scatter plot or `"line"` for a line plot.
- xmin
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.
- xmax
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.
- alpha
A numeric value specifying the transparency level of the plotted points or lines. Default is 0.8.
- type
A character string specifying the y-labes as transmittance or absorbance. Default is absorbance.