Skip to main content

Plot3DSetup

Struct Plot3DSetup 

Source
pub struct Plot3DSetup<'plot> { /* private fields */ }
Expand description

Axis and box configuration, borrowed before the plot locks setup.

ⓘ
use dear_implot3d::{Line3DFlags, Plot3DSetup};
fn draw_during_setup(setup: &Plot3DSetup<'_>) {
    setup.plot_line_f32("line", &[0.0; 2], &[0.0; 2], &[0.0; 2], Line3DFlags::NONE);
}

Implementations§

Source§

impl Plot3DSetup<'_>

Source

pub fn setup_axes( &self, x_label: &str, y_label: &str, z_label: &str, x_flags: Axis3DFlags, y_flags: Axis3DFlags, z_flags: Axis3DFlags, )

Sets the axis labels and flags. Labels may contain literal percent signs.

Source

pub fn setup_axis(&self, axis: Axis3D, label: &str, flags: Axis3DFlags)

Sets one axis label and its flags. The axis menu displays the label verbatim.

Source

pub fn setup_axis_limits( &self, axis: Axis3D, min: f64, max: f64, cond: Plot3DCond, )

Source

pub fn setup_axes_limits( &self, x_min: f64, x_max: f64, y_min: f64, y_max: f64, z_min: f64, z_max: f64, cond: Plot3DCond, )

Source

pub fn setup_axis_limits_constraints( &self, axis: Axis3D, v_min: f64, v_max: f64, )

Source

pub fn setup_axis_zoom_constraints(&self, axis: Axis3D, z_min: f64, z_max: f64)

Source

pub fn setup_axis_ticks_values( &self, axis: Axis3D, values: &[f64], labels: Option<&[&str]>, keep_default: bool, )

Setup axis ticks using explicit positions and optional labels.

If labels is provided, it must have the same length as values.

Source

pub fn setup_axis_ticks_range( &self, axis: Axis3D, v_min: f64, v_max: f64, n_ticks: usize, labels: Option<&[&str]>, keep_default: bool, )

Setup evenly spaced axis ticks over a range with optional labels.

If labels is provided, n_ticks must be at least 2 and labels must have length n_ticks. A label length mismatch leaves the axis unchanged. Without labels, ImPlot3D clamps a count of 1 to 2 ticks.

§Panics

Panics if n_ticks is zero, exceeds i32::MAX, or is less than 2 when labels is provided.

Source

pub fn setup_box_scale(&self, x: f32, y: f32, z: f32)

Source

pub fn setup_box_rotation( &self, elevation: f32, azimuth: f32, animate: bool, cond: Plot3DCond, )

Source

pub fn setup_box_initial_rotation(&self, elevation: f32, azimuth: f32)

Auto Trait Implementations§

§

impl<'plot> !RefUnwindSafe for Plot3DSetup<'plot>

§

impl<'plot> !Send for Plot3DSetup<'plot>

§

impl<'plot> !Sync for Plot3DSetup<'plot>

§

impl<'plot> !UnwindSafe for Plot3DSetup<'plot>

§

impl<'plot> Forget for Plot3DSetup<'plot>

§

impl<'plot> Freeze for Plot3DSetup<'plot>

§

impl<'plot> Move for Plot3DSetup<'plot>

§

impl<'plot> Unpin for Plot3DSetup<'plot>

§

impl<'plot> UnsafeUnpin for Plot3DSetup<'plot>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.