pub struct Axes {
pub x_range: [f64; 3],
pub y_range: [f64; 3],
pub to_scene: Affine,
}Expand description
Fields§
§x_range: [f64; 3][min, max, step] along x, in graph units.
y_range: [f64; 3][min, max, step] along y, in graph units.
to_scene: AffineGraph coordinates to scene coordinates.
Implementations§
Source§impl Axes
impl Axes
Sourcepub fn new(x_range: [f64; 3], y_range: [f64; 3]) -> Self
pub fn new(x_range: [f64; 3], y_range: [f64; 3]) -> Self
manim’s default size: 12 units wide, 6 tall.
Sourcepub fn sized(
x_range: [f64; 3],
y_range: [f64; 3],
x_length: f64,
y_length: f64,
) -> Self
pub fn sized( x_range: [f64; 3], y_range: [f64; 3], x_length: f64, y_length: f64, ) -> Self
Axes x_length by y_length scene units, centered on the origin.
Sourcepub fn plot(&self, f: impl Fn(f64) -> f64, x_range: Range<f64>) -> VState
pub fn plot(&self, f: impl Fn(f64) -> f64, x_range: Range<f64>) -> VState
Graph of y = f(x) over x_range in graph units, manim’s plot.
Sourcepub fn vertical_line(&self, p: Point) -> VState
pub fn vertical_line(&self, p: Point) -> VState
Line from scene point p straight to the x-axis, manim’s get_vertical_line
(solid, not dashed).
Trait Implementations§
impl Copy for Axes
Source§impl Position for Axes
impl Position for Axes
Source§fn next_to(self, other: &impl Position, dir: Vec2, buff: f64) -> Self
fn next_to(self, other: &impl Position, dir: Vec2, buff: f64) -> Self
Places this
buff units from other in direction dir, centered on it along the other
axis, manim’s next_to (e.g. label.next_to(&dot, UP, DEFAULT_BUFF)). A diagonal
dir places it off a corner.impl StructuralPartialEq for Axes
Auto Trait Implementations§
impl Freeze for Axes
impl RefUnwindSafe for Axes
impl Send for Axes
impl Sync for Axes
impl Unpin for Axes
impl UnsafeUnpin for Axes
impl UnwindSafe for Axes
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more