Skip to content
Snippets Groups Projects
Commit d9504af0 authored by Udo Eisenbarth's avatar Udo Eisenbarth :speech_balloon:
Browse files

Spectrum: code optimization in plot fn.

parent e3c4a626
No related branches found
No related tags found
1 merge request!1Resolve "Spectrum: Add serde serializer / deserializer"
Pipeline #7288 canceled
......@@ -359,12 +359,8 @@ impl Spectrum {
let lambdas = self.data.map(|data| data.0);
chart
.draw_series(LineSeries::new(
lambdas
.iter()
.zip(self.data.iter())
.map(|x| (*x.0 * 1.0E9, x.1 .1 * 1E-9)), // y values are displayed in 1/nm
&RED,
))
self.data.map(|data| (data.0 * 1.0E9, data.1* 1.0E-9)), &RED)
)
.unwrap();
root.present().unwrap();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment