smart_arrays_plot_polyline 2.0.8

Dart js
Flutter web

Plots one-dimensional arrays as polylines (curves) in the browser, along with axes and legend text, with versatile view options.

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, 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.

Example #

  • The provided example can be directly executed via ''. Or, download the package and execute the file example/example.html in your browser.

The major API functionalities #

  • Class SimplePlot to create a plot from several arrays, with x and y axes, a text legend and a coordinate grid with just a few lines of code.

  • Class Polyline to construct a polyline plot of desired size from an array with optional layout and viewing parameters.

  • Class Axis to construct an x and/or y axis for a polyline plot.

  • Class XYGrid to construct a rectangular coordinate grid consisting of horizontal and/or vertical lines, to be used to overlay a polyline plot.

  • Class Legend to 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).

  • Class PhysUnits to convert between "physical units" and array indices, useful for axis annotation.

  • Classes Utils and JsonUtils providing useful helper functions.

  • Basic usage of the package: see example directory.

smart_arrays_base: Basic functions for 1D and 2D arrays

smart_arrays_numerics: Numerics with 1D and 2D arrays

smart_arrays_compress: Compress 1D and 2D arrays to a smaller size.

smart_arrays_dbstore: Store 1D and 2D arrays along with metadata on the local device.

smart_arrays_peaks: Detect peaks in 1D and 2D arrays.

smart_arrays_contour_finder: Contours the three-dimensional surface represented by the values f(x,y) of a matrix.

smart_arrays_lmfit: Fits (x, y) data given as arrays to a specified model function using the Levenberg-Marquardt algorithm.

smart_lorentz-gauss: Compute Lorentz-Gauss (pseudo-Voigt) line shapes.

smart_signal_processing: Fourier transform and more of arrays.

smart_dialogs: Easy-to-use dialogs in Web applications

pub points

Plots one-dimensional arrays as polylines (curves) in the browser, along with axes and legend text, with versatile view options.



API reference





build_runner, build_web_compilers, pedantic, smart_arrays_base, smart_arrays_compress


Packages that depend on smart_arrays_plot_polyline