Set the data aspect ratio (y units per x unit). Use 1.0 for square pixels.
(&mut self, aspect: f64)
| 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) { |