plot
Scientific plotting to SVG, PNG and the terminal, in pure Nabi.
Modules
axesThe Axes builder: one plot area with its layers, axes, labels and legend.calendarDates on an axis: values are seconds since 1970-01-01 00:00 UTC (proleptic Gregorian calendar, no leap seconds).colorsRGB colours with alpha, CSS-style parsing, and the colour cycles a theme draws series colours from.colormapColormaps: 256-entry lookup tables, as matplotlib builds them, from the published data (tables.nabi) or from control colours.contourContours of a grid, by marching triangles: each cell splits along one diagonal into two triangles over which the data is linear, so no saddle is ambiguous.dataInput data.errorThe one error type of the package.figureFigures: a layout tree of Axes (rows and columns, nested), a size, a theme and a title, rendered to SVG, PNG or the terminal.fontThe built-in font: Geist Regular, with Greek and some mathematical symbols from Pretendard, as outlines in font units (glyphs.nabi, generated by tools/font.py).formatTick label formatters.framePlotting the columns of atable::Tableby name, with thetablefeature.layerWhat an Axes holds: layers, each one mark (a line, markers, bars, an image, ...) with its style.opsOperators.pathVector paths in pixel coordinates (y down): moves, lines, quadratic and cubic Beziers, and closes.pngPNG encoding (ISO/IEC 15948): 8-bit RGB, or RGBA when any pixel is not opaque, each row filtered by the type with the smallest sum of absolute values (the usual heuristic), compressed by the package's own DEFLATE.quickOne-call plots: each function starts an Axes with one layer, so it chains (plot::line(x, y).label("a").scatter(x, z)), adds (a + boverlays), lays out (a | b,a / b) and pipes (y |> plot::hist() |> plot::svg()).rasterThe rasterizer behind PNG output.scaleAxis scales: the map from data values to a linear screen coordinate.sceneA rendered figure as drawing primitives in px (y down), the one input of every backend.statThe statistics a few plot types draw: histogram bins (NumPy's rules), box plot quartiles (linear interpolation, NumPy's default) and Gaussian kernel density estimates (Scott's bandwidth) for violins.svgThe SVG backend.termThe terminal backend: a quick look in the REPL.textLabel text with a TeX-like math subset.themeThemes: colours, sizes and the colour cycle.ticksTick locators.
Re-exports
axes::{Axes, axes}Source
pub use axes::{Axes, axes}calendar::{date, datetime}Source
pub use calendar::{date, datetime}color::{Color, ColorSpec}Source
pub use color::{Color, ColorSpec}colormap::ColormapSource
pub use colormap::ColormapColormapA map from [0, 1] to colours: 256 entries, looked up as matplotlib does (vin[k / 256, (k + 1) / 256)gives entryk).
data::{Data, Grid}Source
pub use data::{Data, Grid}error::PlotErrorSource
pub use error::PlotErrorPlotErrorWhat went wrong while rendering or saving a figure.
figure::FigureSource
pub use figure::FigureFigureA figure: panels laid out in rows and columns, rendered as one image.
format::FormatSource
pub use format::FormatFormatHow tick values become labels.
layer::{Dash, Loc, Marker, StepAt}Source
pub use layer::{Dash, Loc, Marker, StepAt}path::PathSource
pub use path::PathPathA path.
quick::{Plottable, area, bar, boxplot, contour, contourf, errorbar, fill_between, heatmap, hist, imshow, line, linspace, png, quiver, save, scatter, show, step, svg, violin}Source
pub use quick::{Plottable, area, bar, boxplot, contour, contourf, errorbar, fill_between, heatmap, hist, imshow, line, linspace, png, quiver, save, scatter, show, step, svg, violin}PlottableA figure or an Axes: whatsvg,png,saveandshowtake.areaAn area under a curve.barA bar chart over categories.boxplotBox plots of groups.contourContour lines of a grid.contourfFilled contours of a grid.errorbarPoints with symmetric error bars.fill_betweenThe region between two curves.heatmapA heatmap of a grid, row 0 at the bottom.histA histogram.imshowAn image of a grid, row 0 at the top, square pixels.lineA line plot.linspacepngThe PNG of a figure or an Axes.quiverA vector field.saveWrites a figure or an Axes to an.svgor.pngfile.scatterA scatter plot.showPrints a figure or an Axes to the terminal.stepA step plot.svgThe SVG of a figure or an Axes.violinViolin plots of groups.
scale::ScaleSource
pub use scale::ScaleScaleHow an axis maps values to positions.
stat::BinsSource
pub use stat::BinsBinsHow a histogram picks its bins.
theme::ThemeSource
pub use theme::ThemeThemeHow a figure looks: colours, type sizes, line widths, the series colour cycle and the default colormap.