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<'_>
impl Plot3DSetup<'_>
Sourcepub fn setup_axes(
&self,
x_label: &str,
y_label: &str,
z_label: &str,
x_flags: Axis3DFlags,
y_flags: Axis3DFlags,
z_flags: Axis3DFlags,
)
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.
Sourcepub fn setup_axis(&self, axis: Axis3D, label: &str, flags: Axis3DFlags)
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.
pub fn setup_axis_limits( &self, axis: Axis3D, min: f64, max: f64, cond: Plot3DCond, )
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, )
pub fn setup_axis_limits_constraints( &self, axis: Axis3D, v_min: f64, v_max: f64, )
pub fn setup_axis_zoom_constraints(&self, axis: Axis3D, z_min: f64, z_max: f64)
Sourcepub fn setup_axis_ticks_values(
&self,
axis: Axis3D,
values: &[f64],
labels: Option<&[&str]>,
keep_default: bool,
)
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.
Sourcepub fn setup_axis_ticks_range(
&self,
axis: Axis3D,
v_min: f64,
v_max: f64,
n_ticks: usize,
labels: Option<&[&str]>,
keep_default: bool,
)
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.
pub fn setup_box_scale(&self, x: f32, y: f32, z: f32)
pub fn setup_box_rotation( &self, elevation: f32, azimuth: f32, animate: bool, cond: Plot3DCond, )
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> 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