MCPcopy Create free account
hub / github.com/donkeyteethUX/iced_plot / set_data_aspect

Method set_data_aspect

src/plot_widget.rs:183–190  ·  view source on GitHub ↗

Set the data aspect ratio (y units per x unit). Use 1.0 for square pixels.

(&mut self, aspect: f64)

Source from the content-addressed store, hash-verified

181 }
182
183 /// Add a data series to the plot.
184 /// If there exists a series with the same `item.id` ([ShapeId]), the old one will be replaced.
185 pub fn add_series(&mut self, item: Series) -> Result<(), SeriesError> {
186 item.validate()?;
187 self.series.insert(item.id, item);
188 self.data_version += 1;
189 Ok(())
190 }
191
192 /// Set the data aspect ratio (y units per x unit). Use 1.0 for square pixels.
193 pub fn set_data_aspect(&mut self, aspect: f64) {

Callers 1

buildMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected