Set the width-to-height aspect ratio of the data in the plot. For example, you may want to use 1.0 if both axes are in the same units.
(mut self, aspect: f64)
| 292 | self |
| 293 | } |
| 294 | |
| 295 | /// Set the width-to-height aspect ratio of the data in the plot. |
| 296 | /// |
| 297 | /// For example, you may want to use 1.0 if both axes are in the same units. |
| 298 | pub fn with_data_aspect(mut self, aspect: f64) -> Self { |
| 299 | if aspect.is_sign_positive() { |
| 300 | self.data_aspect = Some(aspect); |
| 301 | } else { |
| 302 | self.data_aspect = None; |
| 303 | } |
| 304 | self |