MCPcopy Create free account
hub / github.com/emilk/egui_plot / aspect

Method aspect

egui_plot/src/axis.rs:586–590  ·  view source on GitHub ↗

scale.x/scale.y ratio. If 1.0, it means the scale factor is the same in both axes.

(&self)

Source from the content-addressed store, hash-verified

584 ///
585 /// If 1.0, it means the scale factor is the same in both axes.
586 fn aspect(&self) -> f64 {
587 let rw = self.frame.width() as f64;
588 let rh = self.frame.height() as f64;
589 (self.bounds.width() / rw) / (self.bounds.height() / rh)
590 }
591
592 /// Sets the aspect ratio by expanding the x- or y-axis.
593 ///

Callers 2

Calls 2

widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected