Skip to content
Snippets Groups Projects

Resolve "Consider using the `genpdf` crate for generating PDF documents from analysis reports."

Files
12
+ 4
3
use std::path::Path;
use opossum::error::OpossumError;
use opossum::plottable::Plottable;
use opossum::spectrum::{create_visible_spectrum, Spectrum};
use uom::si::{f64::Length, length::nanometer};
@@ -36,12 +37,12 @@ fn main() -> Result<(), OpossumError> {
0.02,
)?;
s.sub(&s3);
s.to_plot(Path::new("spectrum.svg"));
s.to_svg_plot(Path::new("spectrum.svg"))?;
let s4 = Spectrum::from_csv("NE03B.csv")?;
s4.to_plot(Path::new("ne03b_raw.svg"));
s4.to_svg_plot(Path::new("ne03b_raw.svg"))?;
let mut s5 = create_visible_spectrum();
s5.resample(&s4);
s5.to_plot(Path::new("ne03b.svg"));
s5.to_svg_plot(Path::new("ne03b.svg"))?;
Ok(())
}
Loading