pub struct PlotUi { /* private fields */ }
Expand description

Provides methods to interact with a plot while building it. It is the single argument of the closure provided to Plot::show. See Plot for an example of how to use it.

Implementations

The plot bounds as they were in the last frame. If called on the first frame and the bounds were not further specified in the plot builder, this will return bounds centered on the origin. The bounds do not change until the plot is drawn.

Returns true if the plot area is currently hovered.

Returns true if the plot was clicked by the primary button.

The pointer position in plot coordinates. Independent of whether the pointer is in the plot area.

The pointer drag delta in plot coordinates.

Transform the plot coordinates to screen coordinates.

Transform the screen coordinates to plot coordinates.

Add a data line.

Add a polygon. The polygon has to be convex.

Add a text.

Add data points.

Add arrows.

Add an image.

Add a horizontal line. Can be useful e.g. to show min/max bounds or similar. Always fills the full width of the plot.

Add a vertical line. Can be useful e.g. to show min/max bounds or similar. Always fills the full height of the plot.

Add a box plot diagram.

Add a bar chart.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.