Crate maelstrom_plot

source ·
Expand description

Plotting library for egui for use with maelstrom-web

This code is originally forked from egui-plot

Structs§

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

Enums§

Functions§

  • Determine a color from a 0-1 strength value.
  • 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.
  • Recursively splits the grid into base subdivisions (e.g. 100, 10, 1).
  • Splits the grid into uniform-sized spacings (e.g. 100, 25, 1).