Smart Arrays Plot Polyline
What the package can do for you
- This package was designed for Web applications which need to plot 1D arrays in form of polylines (curves in the x, y plane).
- A plot may consist of one or several polylines (scaled relative to each other if desired), optionally with x and y axes, a coordinate grid, a text legend, selection icons, and marker text.
- Many array viewing options are provided, such as colors, fonts, zooming, scaling, shifting, rotation, layout parameters.
- Also, lists of points represented by circles or other shapes can be drawn, e.g.to draw a curve using individual points rather than connecting the points by polylines.
- The arrays to be plotted may have small or big sizes (even e.g. 1 million points). To achieve fast plotting without loosing information given typical screen or window sizes, a suitable data compression is applied before plotting (using the compression package listed at the end of the document).
- Plotting is performed using Scalable Vector Graphics SVG.
The major API functionalities
Polylineto construct a polyline plot of desired size from an array with optional layout and viewing parameters.
Axisto construct an x and/or y axis for a polyline plot.
XYGridto construct a rectangular coordinate grid consisting of horizontal and/or vertical lines, to be used to overlay a polyline plot.
Legendto construct a legend consisting of a text line at the top ("top title") and optionally several more lines, each one preceded by a color rectangle (useful when displaying several polylines).
PhysUnitsto convert between "physical units" and array indices, useful for axis annotation.
JsonUtilsproviding useful helper functions.
Basic usage of the package: see
Please view the detailed API documentation in the
API reference of this package (sidebar at the right of this page).