pub struct PlotUi<'ui> { /* private fields */ }Expand description
A temporary reference for building plots
This struct ensures that plots can only be created when both ImGui and ImPlot contexts are available and properly set up.
Implementations§
Source§impl<'ui> PlotUi<'ui>
impl<'ui> PlotUi<'ui>
Sourcepub fn setup_x_axis(&self, axis: XAxis, label: Option<&str>, flags: AxisFlags)
pub fn setup_x_axis(&self, axis: XAxis, label: Option<&str>, flags: AxisFlags)
Setup a specific X axis
Sourcepub fn setup_y_axis(&self, axis: YAxis, label: Option<&str>, flags: AxisFlags)
pub fn setup_y_axis(&self, axis: YAxis, label: Option<&str>, flags: AxisFlags)
Setup a specific Y axis
Sourcepub fn setup_x_axis_limits(
&self,
axis: XAxis,
min: f64,
max: f64,
cond: PlotCond,
)
pub fn setup_x_axis_limits( &self, axis: XAxis, min: f64, max: f64, cond: PlotCond, )
Setup axis limits for a specific X axis
Sourcepub fn setup_y_axis_limits(
&self,
axis: YAxis,
min: f64,
max: f64,
cond: PlotCond,
)
pub fn setup_y_axis_limits( &self, axis: YAxis, min: f64, max: f64, cond: PlotCond, )
Setup axis limits for a specific Y axis
Sourcepub fn setup_axis_links(
&self,
axis: Axis,
link_min: Option<&mut f64>,
link_max: Option<&mut f64>,
)
pub fn setup_axis_links( &self, axis: Axis, link_min: Option<&mut f64>, link_max: Option<&mut f64>, )
Link an axis to external min/max values (live binding)
Sourcepub unsafe fn setup_axis_links_unchecked(
&self,
axis: ImAxis,
link_min: Option<&mut f64>,
link_max: Option<&mut f64>,
)
pub unsafe fn setup_axis_links_unchecked( &self, axis: ImAxis, link_min: Option<&mut f64>, link_max: Option<&mut f64>, )
Link a raw axis to external min/max values (live binding).
§Safety
axis must be a valid ImPlot ImAxis value for the active plot. Passing an
out-of-range value lets ImPlot index internal axis arrays out of bounds.
Sourcepub fn setup_axes(
&self,
x_label: Option<&str>,
y_label: Option<&str>,
x_flags: AxisFlags,
y_flags: AxisFlags,
)
pub fn setup_axes( &self, x_label: Option<&str>, y_label: Option<&str>, x_flags: AxisFlags, y_flags: AxisFlags, )
Setup both axes labels/flags at once
Sourcepub fn setup_axes_limits(
&self,
x_min: f64,
x_max: f64,
y_min: f64,
y_max: f64,
cond: PlotCond,
)
pub fn setup_axes_limits( &self, x_min: f64, x_max: f64, y_min: f64, y_max: f64, cond: PlotCond, )
Setup axes limits (both) at once
Sourcepub fn setup_finish(&self)
pub fn setup_finish(&self)
Call after axis setup to finalize configuration
Sourcepub fn set_next_x_axis_limits(
&self,
axis: XAxis,
min: f64,
max: f64,
cond: PlotCond,
)
pub fn set_next_x_axis_limits( &self, axis: XAxis, min: f64, max: f64, cond: PlotCond, )
Set next frame limits for a specific axis
Sourcepub fn set_next_y_axis_limits(
&self,
axis: YAxis,
min: f64,
max: f64,
cond: PlotCond,
)
pub fn set_next_y_axis_limits( &self, axis: YAxis, min: f64, max: f64, cond: PlotCond, )
Set next frame limits for a specific axis
Sourcepub fn set_next_axis_links(
&self,
axis: Axis,
link_min: Option<&mut f64>,
link_max: Option<&mut f64>,
)
pub fn set_next_axis_links( &self, axis: Axis, link_min: Option<&mut f64>, link_max: Option<&mut f64>, )
Link an axis to external min/max for next frame
Sourcepub unsafe fn set_next_axis_links_unchecked(
&self,
axis: ImAxis,
link_min: Option<&mut f64>,
link_max: Option<&mut f64>,
)
pub unsafe fn set_next_axis_links_unchecked( &self, axis: ImAxis, link_min: Option<&mut f64>, link_max: Option<&mut f64>, )
Link a raw axis to external min/max for the next frame.
§Safety
axis must be a valid ImPlot ImAxis value. Passing an out-of-range
value lets ImPlot index internal next-plot arrays out of bounds.
Sourcepub fn set_next_axes_limits(
&self,
x_min: f64,
x_max: f64,
y_min: f64,
y_max: f64,
cond: PlotCond,
)
pub fn set_next_axes_limits( &self, x_min: f64, x_max: f64, y_min: f64, y_max: f64, cond: PlotCond, )
Set next frame limits for both axes
Sourcepub fn set_next_axes_to_fit(&self)
pub fn set_next_axes_to_fit(&self)
Fit next frame both axes
Sourcepub fn set_next_axis_to_fit(&self, axis: Axis)
pub fn set_next_axis_to_fit(&self, axis: Axis)
Fit next frame a specific axis
Sourcepub unsafe fn set_next_axis_to_fit_unchecked(&self, axis: ImAxis)
pub unsafe fn set_next_axis_to_fit_unchecked(&self, axis: ImAxis)
Fit next frame a raw axis.
§Safety
axis must be a valid ImPlot ImAxis value. Passing an out-of-range
value lets ImPlot index internal next-plot arrays out of bounds.
Sourcepub fn set_next_x_axis_to_fit(&self, axis: XAxis)
pub fn set_next_x_axis_to_fit(&self, axis: XAxis)
Fit next frame a specific X axis
Sourcepub fn set_next_y_axis_to_fit(&self, axis: YAxis)
pub fn set_next_y_axis_to_fit(&self, axis: YAxis)
Fit next frame a specific Y axis
Sourcepub fn setup_x_axis_ticks_positions(
&self,
axis: XAxis,
values: &[f64],
labels: Option<&[&str]>,
keep_default: bool,
)
pub fn setup_x_axis_ticks_positions( &self, axis: XAxis, values: &[f64], labels: Option<&[&str]>, keep_default: bool, )
Setup ticks with explicit positions and optional labels for an X axis.
If labels is provided, it must have the same length as values.
Sourcepub fn setup_y_axis_ticks_positions(
&self,
axis: YAxis,
values: &[f64],
labels: Option<&[&str]>,
keep_default: bool,
)
pub fn setup_y_axis_ticks_positions( &self, axis: YAxis, values: &[f64], labels: Option<&[&str]>, keep_default: bool, )
Setup ticks with explicit positions and optional labels for a Y axis.
If labels is provided, it must have the same length as values.
Sourcepub fn setup_x_axis_ticks_range(
&self,
axis: XAxis,
v_min: f64,
v_max: f64,
n_ticks: usize,
labels: Option<&[&str]>,
keep_default: bool,
)
pub fn setup_x_axis_ticks_range( &self, axis: XAxis, v_min: f64, v_max: f64, n_ticks: usize, labels: Option<&[&str]>, keep_default: bool, )
Setup ticks on a range with tick count and optional labels for an X axis.
If labels is provided, it must have length n_ticks.
Sourcepub fn setup_y_axis_ticks_range(
&self,
axis: YAxis,
v_min: f64,
v_max: f64,
n_ticks: usize,
labels: Option<&[&str]>,
keep_default: bool,
)
pub fn setup_y_axis_ticks_range( &self, axis: YAxis, v_min: f64, v_max: f64, n_ticks: usize, labels: Option<&[&str]>, keep_default: bool, )
Setup ticks on a range with tick count and optional labels for a Y axis.
If labels is provided, it must have length n_ticks.
Sourcepub fn setup_x_axis_format(&self, axis: XAxis, format: &AxisFormat<'_>)
pub fn setup_x_axis_format(&self, axis: XAxis, format: &AxisFormat<'_>)
Setup a validated tick label format for a specific X axis.
Sourcepub fn setup_y_axis_format(&self, axis: YAxis, format: &AxisFormat<'_>)
pub fn setup_y_axis_format(&self, axis: YAxis, format: &AxisFormat<'_>)
Setup a validated tick label format for a specific Y axis.
Sourcepub fn setup_x_axis_scale(&self, axis: XAxis, scale: ImPlotScale)
pub fn setup_x_axis_scale(&self, axis: XAxis, scale: ImPlotScale)
Setup scale for a specific X axis (pass sys::ImPlotScale variant)
Sourcepub fn setup_y_axis_scale(&self, axis: YAxis, scale: ImPlotScale)
pub fn setup_y_axis_scale(&self, axis: YAxis, scale: ImPlotScale)
Setup scale for a specific Y axis (pass sys::ImPlotScale variant)
Sourcepub fn setup_axis_limits_constraints(&self, axis: Axis, v_min: f64, v_max: f64)
pub fn setup_axis_limits_constraints(&self, axis: Axis, v_min: f64, v_max: f64)
Setup axis limits constraints
Sourcepub unsafe fn setup_axis_limits_constraints_unchecked(
&self,
axis: ImAxis,
v_min: f64,
v_max: f64,
)
pub unsafe fn setup_axis_limits_constraints_unchecked( &self, axis: ImAxis, v_min: f64, v_max: f64, )
Setup raw axis limits constraints.
§Safety
axis must be a valid ImPlot ImAxis value for the active plot. Passing an
out-of-range value lets ImPlot index internal axis arrays out of bounds.
Sourcepub fn setup_axis_zoom_constraints(&self, axis: Axis, z_min: f64, z_max: f64)
pub fn setup_axis_zoom_constraints(&self, axis: Axis, z_min: f64, z_max: f64)
Setup axis zoom constraints
Source§impl<'ui> PlotUi<'ui>
impl<'ui> PlotUi<'ui>
Sourcepub fn setup_x_axis_format_closure<F>(
&self,
axis: XAxis,
f: F,
) -> AxisFormatterToken
pub fn setup_x_axis_format_closure<F>( &self, axis: XAxis, f: F, ) -> AxisFormatterToken
Setup tick label formatter using a Rust closure.
The closure is kept alive until the current plot ends.
Sourcepub fn setup_y_axis_format_closure<F>(
&self,
axis: YAxis,
f: F,
) -> AxisFormatterToken
pub fn setup_y_axis_format_closure<F>( &self, axis: YAxis, f: F, ) -> AxisFormatterToken
Setup tick label formatter using a Rust closure.
The closure is kept alive until the current plot ends.
Sourcepub fn setup_x_axis_transform_closure<FW, INV>(
&self,
axis: XAxis,
forward: FW,
inverse: INV,
) -> AxisTransformToken
pub fn setup_x_axis_transform_closure<FW, INV>( &self, axis: XAxis, forward: FW, inverse: INV, ) -> AxisTransformToken
Setup custom axis transform using Rust closures (forward/inverse).
The closures are kept alive until the current plot ends.
Source§impl<'ui> PlotUi<'ui>
impl<'ui> PlotUi<'ui>
Sourcepub fn begin_plot(&self, title: &str) -> Option<PlotToken<'_>>
pub fn begin_plot(&self, title: &str) -> Option<PlotToken<'_>>
Begin a new plot with the given title
Returns a PlotToken if the plot was successfully started. The plot will be automatically ended when the token is dropped.
Sourcepub fn begin_plot_with_size(
&self,
title: &str,
size: [f32; 2],
) -> Option<PlotToken<'_>>
pub fn begin_plot_with_size( &self, title: &str, size: [f32; 2], ) -> Option<PlotToken<'_>>
Begin a plot with custom size
Sourcepub fn plot_line(&self, label: &str, x_data: &[f64], y_data: &[f64])
pub fn plot_line(&self, label: &str, x_data: &[f64], y_data: &[f64])
Plot a line with the given label and data
This is a convenience method that can be called within a plot.
Sourcepub fn plot_scatter(&self, label: &str, x_data: &[f64], y_data: &[f64])
pub fn plot_scatter(&self, label: &str, x_data: &[f64], y_data: &[f64])
Plot a scatter plot with the given label and data
Sourcepub fn plot_polygon(&self, label: &str, x_data: &[f64], y_data: &[f64])
pub fn plot_polygon(&self, label: &str, x_data: &[f64], y_data: &[f64])
Plot a polygon with the given label and vertex data.
Sourcepub fn is_plot_hovered(&self) -> bool
pub fn is_plot_hovered(&self) -> bool
Check if the plot area is hovered
Sourcepub fn get_plot_mouse_pos(&self, y_axis: Option<YAxisChoice>) -> ImPlotPoint
pub fn get_plot_mouse_pos(&self, y_axis: Option<YAxisChoice>) -> ImPlotPoint
Get the mouse position in plot coordinates
Sourcepub fn get_plot_mouse_pos_axes(
&self,
x_axis: XAxis,
y_axis: YAxis,
) -> ImPlotPoint
pub fn get_plot_mouse_pos_axes( &self, x_axis: XAxis, y_axis: YAxis, ) -> ImPlotPoint
Get the mouse position in plot coordinates for specific axes
Source§impl<'ui> PlotUi<'ui>
impl<'ui> PlotUi<'ui>
Sourcepub unsafe fn with_next_plot_item_array_style<'a, R>(
&self,
style: PlotItemArrayStyle<'a>,
f: impl FnOnce(&PlotUi<'ui>) -> R,
) -> R
pub unsafe fn with_next_plot_item_array_style<'a, R>( &self, style: PlotItemArrayStyle<'a>, f: impl FnOnce(&PlotUi<'ui>) -> R, ) -> R
Apply array-backed item styling to the next plot submission executed inside f.
This is closure-scoped so borrowed slices stay valid for the entire next plot
call and are restored even if f panics before submitting an item.
§Safety
Every non-empty style array must contain enough elements for every index the submitted plot may read. Upstream accepts only pointers and carries no array lengths, so this cannot be validated by the wrapper.
Sourcepub fn push_style_var_f32(&self, var: StyleVar, value: f32) -> StyleVarToken<'_>
pub fn push_style_var_f32(&self, var: StyleVar, value: f32) -> StyleVarToken<'_>
Push a float style variable to this ImPlot context’s stack.
Sourcepub fn push_style_var_vec2(
&self,
var: StyleVar,
value: [f32; 2],
) -> StyleVarToken<'_>
pub fn push_style_var_vec2( &self, var: StyleVar, value: [f32; 2], ) -> StyleVarToken<'_>
Push a Vec2 style variable to this ImPlot context’s stack.
Sourcepub fn push_style_color(
&self,
element: PlotColorElement,
color: [f32; 4],
) -> StyleColorToken<'_>
pub fn push_style_color( &self, element: PlotColorElement, color: [f32; 4], ) -> StyleColorToken<'_>
Push a style color to this ImPlot context’s stack.
Sourcepub fn push_colormap(&self, cmap: impl Into<ColormapIndex>) -> ColormapToken<'_>
pub fn push_colormap(&self, cmap: impl Into<ColormapIndex>) -> ColormapToken<'_>
Push a colormap to this ImPlot context’s stack.
Sourcepub fn push_colormap_name(&self, name: &str) -> ColormapToken<'_>
pub fn push_colormap_name(&self, name: &str) -> ColormapToken<'_>
Push a colormap by name to this ImPlot context’s stack.
Source§impl PlotUi<'_>
impl PlotUi<'_>
Sourcepub fn show_style_editor(&self)
pub fn show_style_editor(&self)
Show the ImPlot style editor window for this context.
Sourcepub fn show_style_selector(&self, label: &str) -> bool
pub fn show_style_selector(&self, label: &str) -> bool
Show the ImPlot style selector combo; returns true if selection changed.
Sourcepub fn show_colormap_selector(&self, label: &str) -> bool
pub fn show_colormap_selector(&self, label: &str) -> bool
Show the ImPlot colormap selector combo; returns true if selection changed.
Sourcepub fn show_input_map_selector(&self, label: &str) -> bool
pub fn show_input_map_selector(&self, label: &str) -> bool
Show the ImPlot input-map selector combo; returns true if selection changed.
Sourcepub fn colormap_scale(
&self,
label: &str,
scale_min: f64,
scale_max: f64,
height: f32,
cmap: impl Into<ColormapSelection>,
)
pub fn colormap_scale( &self, label: &str, scale_min: f64, scale_max: f64, height: f32, cmap: impl Into<ColormapSelection>, )
Draw a colormap scale widget.
Sourcepub fn colormap_scale_with_format(
&self,
label: &str,
scale_min: f64,
scale_max: f64,
height: f32,
format: &FloatFormat<'_>,
cmap: impl Into<ColormapSelection>,
)
pub fn colormap_scale_with_format( &self, label: &str, scale_min: f64, scale_max: f64, height: f32, format: &FloatFormat<'_>, cmap: impl Into<ColormapSelection>, )
Draw a colormap scale with a validated tick format.
Sourcepub fn colormap_slider(
&self,
label: &str,
t: &mut f32,
out_color: Option<&mut [f32; 4]>,
cmap: impl Into<ColormapSelection>,
) -> bool
pub fn colormap_slider( &self, label: &str, t: &mut f32, out_color: Option<&mut [f32; 4]>, cmap: impl Into<ColormapSelection>, ) -> bool
Draw a colormap slider with ImPlot’s default value format.
Sourcepub fn colormap_slider_with_format(
&self,
label: &str,
t: &mut f32,
out_color: Option<&mut [f32; 4]>,
format: &FloatFormat<'_>,
cmap: impl Into<ColormapSelection>,
) -> bool
pub fn colormap_slider_with_format( &self, label: &str, t: &mut f32, out_color: Option<&mut [f32; 4]>, format: &FloatFormat<'_>, cmap: impl Into<ColormapSelection>, ) -> bool
Draw a colormap slider with a validated value format.
Draw a colormap picker button; returns true if clicked.
Source§impl PlotUi<'_>
impl PlotUi<'_>
Sourcepub fn is_subplots_hovered(&self) -> bool
pub fn is_subplots_hovered(&self) -> bool
Check if any subplots area is hovered.
Sourcepub fn is_legend_entry_hovered(&self, label: &str) -> bool
pub fn is_legend_entry_hovered(&self, label: &str) -> bool
Check if a legend entry is hovered.
Sourcepub fn plot_mouse_position(
&self,
y_axis_choice: Option<YAxisChoice>,
) -> ImPlotPoint
pub fn plot_mouse_position( &self, y_axis_choice: Option<YAxisChoice>, ) -> ImPlotPoint
Get the mouse position in plot coordinates.
Sourcepub fn plot_mouse_position_axes(
&self,
x_axis: XAxis,
y_axis: YAxis,
) -> ImPlotPoint
pub fn plot_mouse_position_axes( &self, x_axis: XAxis, y_axis: YAxis, ) -> ImPlotPoint
Get the mouse position in plot coordinates for specific axes.
Sourcepub fn pixels_to_plot(
&self,
pixel_position: [f32; 2],
y_axis_choice: Option<YAxisChoice>,
) -> ImPlotPoint
pub fn pixels_to_plot( &self, pixel_position: [f32; 2], y_axis_choice: Option<YAxisChoice>, ) -> ImPlotPoint
Convert pixels to plot coordinates.
Sourcepub fn pixels_to_plot_axes(
&self,
pixel_position: [f32; 2],
x_axis: XAxis,
y_axis: YAxis,
) -> ImPlotPoint
pub fn pixels_to_plot_axes( &self, pixel_position: [f32; 2], x_axis: XAxis, y_axis: YAxis, ) -> ImPlotPoint
Convert pixels to plot coordinates for specific axes.
Sourcepub fn plot_to_pixels(
&self,
plot_position: ImPlotPoint,
y_axis_choice: Option<YAxisChoice>,
) -> [f32; 2]
pub fn plot_to_pixels( &self, plot_position: ImPlotPoint, y_axis_choice: Option<YAxisChoice>, ) -> [f32; 2]
Convert plot coordinates to pixels.
Sourcepub fn plot_to_pixels_axes(
&self,
plot_position: ImPlotPoint,
x_axis: XAxis,
y_axis: YAxis,
) -> [f32; 2]
pub fn plot_to_pixels_axes( &self, plot_position: ImPlotPoint, x_axis: XAxis, y_axis: YAxis, ) -> [f32; 2]
Convert plot coordinates to pixels for specific axes.
Sourcepub fn plot_limits(
&self,
_x_axis_choice: Option<YAxisChoice>,
y_axis_choice: Option<YAxisChoice>,
) -> ImPlotRect
pub fn plot_limits( &self, _x_axis_choice: Option<YAxisChoice>, y_axis_choice: Option<YAxisChoice>, ) -> ImPlotRect
Get the current plot limits.
Sourcepub fn is_plot_selected(&self) -> bool
pub fn is_plot_selected(&self) -> bool
Whether a plot has an active selection region.
Sourcepub fn plot_selection_axes(
&self,
x_axis: XAxis,
y_axis: YAxis,
) -> Option<ImPlotRect>
pub fn plot_selection_axes( &self, x_axis: XAxis, y_axis: YAxis, ) -> Option<ImPlotRect>
Get the current plot selection rectangle for specific axes.
Sourcepub fn annotation_point(
&self,
x: f64,
y: f64,
color: [f32; 4],
pixel_offset: [f32; 2],
clamp: bool,
round: bool,
)
pub fn annotation_point( &self, x: f64, y: f64, color: [f32; 4], pixel_offset: [f32; 2], clamp: bool, round: bool, )
Draw a simple round annotation marker at (x,y).
Sourcepub fn annotation_text(
&self,
x: f64,
y: f64,
color: [f32; 4],
pixel_offset: [f32; 2],
clamp: bool,
text: &str,
)
pub fn annotation_text( &self, x: f64, y: f64, color: [f32; 4], pixel_offset: [f32; 2], clamp: bool, text: &str, )
Draw a literal text annotation at (x,y).
The underlying non-variadic C entrypoint still accepts a printf format
string, so percent signs are escaped before crossing the FFI boundary.
Sourcepub fn tag_x(&self, x: f64, color: [f32; 4], round: bool)
pub fn tag_x(&self, x: f64, color: [f32; 4], round: bool)
Tag the X axis at position x with a tick-like mark.
Sourcepub fn tag_x_text(&self, x: f64, color: [f32; 4], text: &str)
pub fn tag_x_text(&self, x: f64, color: [f32; 4], text: &str)
Tag the X axis at position x with a literal text label.
Sourcepub fn tag_y(&self, y: f64, color: [f32; 4], round: bool)
pub fn tag_y(&self, y: f64, color: [f32; 4], round: bool)
Tag the Y axis at position y with a tick-like mark.
Sourcepub fn tag_y_text(&self, y: f64, color: [f32; 4], text: &str)
pub fn tag_y_text(&self, y: f64, color: [f32; 4], text: &str)
Tag the Y axis at position y with a literal text label.
Sourcepub fn plot_limits_axes(&self, x_axis: XAxis, y_axis: YAxis) -> ImPlotRect
pub fn plot_limits_axes(&self, x_axis: XAxis, y_axis: YAxis) -> ImPlotRect
Get the current plot limits for specific axes.
Sourcepub fn is_axis_hovered(&self, axis: Axis) -> bool
pub fn is_axis_hovered(&self, axis: Axis) -> bool
Check if an axis is hovered.
Sourcepub unsafe fn is_axis_hovered_unchecked(&self, axis: ImAxis) -> bool
pub unsafe fn is_axis_hovered_unchecked(&self, axis: ImAxis) -> bool
Check if a raw axis is hovered.
§Safety
axis must be a valid ImPlot ImAxis value for the current plot. Passing an
out-of-range value lets ImPlot index internal axis arrays out of bounds.
Sourcepub fn is_plot_x_axis_hovered(&self) -> bool
pub fn is_plot_x_axis_hovered(&self) -> bool
Check if the X axis is hovered.
Sourcepub fn is_plot_x_axis_hovered_axis(&self, x_axis: XAxis) -> bool
pub fn is_plot_x_axis_hovered_axis(&self, x_axis: XAxis) -> bool
Check if a specific X axis is hovered.
Sourcepub fn is_plot_y_axis_hovered(&self, y_axis_choice: Option<YAxisChoice>) -> bool
pub fn is_plot_y_axis_hovered(&self, y_axis_choice: Option<YAxisChoice>) -> bool
Check if a Y axis is hovered.
Sourcepub fn is_plot_y_axis_hovered_axis(&self, y_axis: YAxis) -> bool
pub fn is_plot_y_axis_hovered_axis(&self, y_axis: YAxis) -> bool
Check if a specific Y axis is hovered.
Sourcepub fn show_demo_window(&self, _show: &mut bool)
pub fn show_demo_window(&self, _show: &mut bool)
Stub when demo feature is disabled.
Sourcepub fn show_user_guide(&self)
pub fn show_user_guide(&self)
Show the built-in user guide for ImPlot.
Sourcepub fn show_metrics_window(&self, open: &mut bool)
pub fn show_metrics_window(&self, open: &mut bool)
Show the metrics window.
Source§impl PlotUi<'_>
impl PlotUi<'_>
Sourcepub fn drag_point(
&self,
id: DragToolId,
x: &mut f64,
y: &mut f64,
color: [f32; 4],
size: f32,
flags: DragToolFlags,
) -> DragResult
pub fn drag_point( &self, id: DragToolId, x: &mut f64, y: &mut f64, color: [f32; 4], size: f32, flags: DragToolFlags, ) -> DragResult
Draggable point with result flags.
Sourcepub fn drag_line_x(
&self,
id: DragToolId,
x: &mut f64,
color: [f32; 4],
thickness: f32,
flags: DragToolFlags,
) -> DragResult
pub fn drag_line_x( &self, id: DragToolId, x: &mut f64, color: [f32; 4], thickness: f32, flags: DragToolFlags, ) -> DragResult
Draggable vertical line at x.
Sourcepub fn drag_line_y(
&self,
id: DragToolId,
y: &mut f64,
color: [f32; 4],
thickness: f32,
flags: DragToolFlags,
) -> DragResult
pub fn drag_line_y( &self, id: DragToolId, y: &mut f64, color: [f32; 4], thickness: f32, flags: DragToolFlags, ) -> DragResult
Draggable horizontal line at y.
Source§impl<'ui> PlotUi<'ui>
Convenience functions for quick bar plotting
impl<'ui> PlotUi<'ui>
Convenience functions for quick bar plotting
Source§impl<'ui> PlotUi<'ui>
Convenience functions for quick error bars plotting
impl<'ui> PlotUi<'ui>
Convenience functions for quick error bars plotting
Sourcepub fn error_bars_plot(
&self,
label: &str,
x_data: &[f64],
y_data: &[f64],
err_data: &[f64],
) -> Result<(), PlotError>
pub fn error_bars_plot( &self, label: &str, x_data: &[f64], y_data: &[f64], err_data: &[f64], ) -> Result<(), PlotError>
Plot error bars with symmetric errors
Source§impl<'ui> PlotUi<'ui>
Convenience functions for quick heatmap plotting
impl<'ui> PlotUi<'ui>
Convenience functions for quick heatmap plotting
Sourcepub fn heatmap_plot(
&self,
label: &str,
values: &[f64],
rows: usize,
cols: usize,
) -> Result<(), PlotError>
pub fn heatmap_plot( &self, label: &str, values: &[f64], rows: usize, cols: usize, ) -> Result<(), PlotError>
Plot a heatmap with f64 data
Sourcepub fn heatmap_plot_f32(
&self,
label: &str,
values: &[f32],
rows: usize,
cols: usize,
) -> Result<(), PlotError>
pub fn heatmap_plot_f32( &self, label: &str, values: &[f32], rows: usize, cols: usize, ) -> Result<(), PlotError>
Plot a heatmap with f32 data
Sourcepub fn heatmap_plot_scaled(
&self,
label: &str,
values: &[f64],
rows: usize,
cols: usize,
scale_min: f64,
scale_max: f64,
bounds_min: ImPlotPoint,
bounds_max: ImPlotPoint,
) -> Result<(), PlotError>
pub fn heatmap_plot_scaled( &self, label: &str, values: &[f64], rows: usize, cols: usize, scale_min: f64, scale_max: f64, bounds_min: ImPlotPoint, bounds_max: ImPlotPoint, ) -> Result<(), PlotError>
Plot a heatmap with custom scale and bounds
Source§impl<'ui> PlotUi<'ui>
Convenience functions for quick histogram plotting
impl<'ui> PlotUi<'ui>
Convenience functions for quick histogram plotting
Sourcepub fn histogram_plot(
&self,
label: &str,
values: &[f64],
) -> Result<(), PlotError>
pub fn histogram_plot( &self, label: &str, values: &[f64], ) -> Result<(), PlotError>
Plot a 1D histogram with default settings
Sourcepub fn histogram_plot_with_bins(
&self,
label: &str,
values: &[f64],
bins: impl Into<HistogramBins>,
) -> Result<(), PlotError>
pub fn histogram_plot_with_bins( &self, label: &str, values: &[f64], bins: impl Into<HistogramBins>, ) -> Result<(), PlotError>
Plot a 1D histogram with custom bin count
Sourcepub fn histogram_2d_plot(
&self,
label: &str,
x_values: &[f64],
y_values: &[f64],
) -> Result<(), PlotError>
pub fn histogram_2d_plot( &self, label: &str, x_values: &[f64], y_values: &[f64], ) -> Result<(), PlotError>
Plot a 2D histogram (bivariate histogram as heatmap)
Sourcepub fn histogram_2d_plot_with_bins(
&self,
label: &str,
x_values: &[f64],
y_values: &[f64],
x_bins: impl Into<HistogramBins>,
y_bins: impl Into<HistogramBins>,
) -> Result<(), PlotError>
pub fn histogram_2d_plot_with_bins( &self, label: &str, x_values: &[f64], y_values: &[f64], x_bins: impl Into<HistogramBins>, y_bins: impl Into<HistogramBins>, ) -> Result<(), PlotError>
Plot a 2D histogram with custom bin counts
Source§impl<'ui> PlotUi<'ui>
Convenience methods on PlotUi
impl<'ui> PlotUi<'ui>
Convenience methods on PlotUi
pub fn plot_image<'tex>( &self, label: &str, texture: impl Into<TextureRef<'tex>>, bounds_min: ImPlotPoint, bounds_max: ImPlotPoint, ) -> Result<(), PlotError>
Sourcepub fn plot_image_with_imgui_texture(
&self,
label: &str,
texture: TextureId,
bounds_min: ImPlotPoint,
bounds_max: ImPlotPoint,
) -> Result<(), PlotError>
pub fn plot_image_with_imgui_texture( &self, label: &str, texture: TextureId, bounds_min: ImPlotPoint, bounds_max: ImPlotPoint, ) -> Result<(), PlotError>
Plot an image using ImGui’s TextureId wrapper (if available)
Source§impl<'ui> PlotUi<'ui>
Convenience functions for quick pie chart plotting
impl<'ui> PlotUi<'ui>
Convenience functions for quick pie chart plotting
Sourcepub fn pie_chart_plot(
&self,
label_ids: Vec<&str>,
values: &[f64],
center_x: f64,
center_y: f64,
radius: f64,
) -> Result<(), PlotError>
pub fn pie_chart_plot( &self, label_ids: Vec<&str>, values: &[f64], center_x: f64, center_y: f64, radius: f64, ) -> Result<(), PlotError>
Plot a pie chart with f64 data
Source§impl<'ui> PlotUi<'ui>
Convenience functions for quick scatter plotting
impl<'ui> PlotUi<'ui>
Convenience functions for quick scatter plotting
Source§impl<'ui> PlotUi<'ui>
Convenience functions for quick shaded plotting
impl<'ui> PlotUi<'ui>
Convenience functions for quick shaded plotting
Sourcepub fn shaded_plot(
&self,
label: &str,
x_data: &[f64],
y_data: &[f64],
) -> Result<(), PlotError>
pub fn shaded_plot( &self, label: &str, x_data: &[f64], y_data: &[f64], ) -> Result<(), PlotError>
Plot a shaded area between a line and Y=0
Sourcepub fn shaded_plot_with_ref(
&self,
label: &str,
x_data: &[f64],
y_data: &[f64],
y_ref: f64,
) -> Result<(), PlotError>
pub fn shaded_plot_with_ref( &self, label: &str, x_data: &[f64], y_data: &[f64], y_ref: f64, ) -> Result<(), PlotError>
Plot a shaded area between a line and a reference Y value
Source§impl<'ui> PlotUi<'ui>
Convenience functions for quick stem plotting
impl<'ui> PlotUi<'ui>
Convenience functions for quick stem plotting
Sourcepub fn stem_plot(
&self,
label: &str,
x_data: &[f64],
y_data: &[f64],
) -> Result<(), PlotError>
pub fn stem_plot( &self, label: &str, x_data: &[f64], y_data: &[f64], ) -> Result<(), PlotError>
Plot a stem plot with X and Y data
Sourcepub fn stem_plot_with_ref(
&self,
label: &str,
x_data: &[f64],
y_data: &[f64],
y_ref: f64,
) -> Result<(), PlotError>
pub fn stem_plot_with_ref( &self, label: &str, x_data: &[f64], y_data: &[f64], y_ref: f64, ) -> Result<(), PlotError>
Plot a stem plot with custom reference Y value