Crate maelstrom_plot

Source
Expand description

Plotting library for egui for use with maelstrom-web

This code is originally forked from egui-plot

Structs§

AxisBools
Two bools, one for each axis (X and Y).
AxisHints
Axis configuration.
CoordinatesFormatter
Specifies the coordinates formatting when passed to Plot::coordinates_formatter.
GridInput
Input for “grid spacer” functions.
GridMark
One mark (horizontal or vertical line) in the background grid of a plot.
Legend
The configuration for a plot legend.
Line
A series of values forming a path.
Plot
A 2D plot, e.g. a graph of a function.
PlotBounds
2D bounding box of f64 precision. The range of data values we show.
PlotPoint
A point coordinate in the plot.
PlotResponse
What Plot::show returns.
PlotTransform
Contains the screen rectangle and the plot bounds and provides methods to transform between them.
PlotUi
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.
Points
A set of points.
Polygon
A convex polygon.
StackedLine
A series of values forming a path stacked on top of another line
Text
Text inside the plot.

Enums§

Axis
X or Y axis.
Corner
Where to place the plot legend.
HPlacement
Placement of the vertical Y-Axis.
LineStyle
Solid, dotted, dashed, etc.
MarkerShape
Circle, Diamond, Square, Cross, …
Orientation
Determines whether a plot element is vertically or horizontally oriented.
Placement
Placement of an axis.
PlotPoints
Represents many PlotPoints.
VPlacement
Placement of the horizontal X-Axis.

Functions§

color_from_strength
Determine a color from a 0-1 strength value.
format_number
Helper for formatting a number so that we always show at least a few decimals, unless it is an integer, in which case we never show any decimals.
log_grid_spacer
Recursively splits the grid into base subdivisions (e.g. 100, 10, 1).
uniform_grid_spacer
Splits the grid into uniform-sized spacings (e.g. 100, 25, 1).