docs
Members list
Concise view
Packages
package org.nspl
nspl is a Scala library to describe and render scientific plots.
nspl is a Scala library to describe and render scientific plots.
Entry points into the API:
- org.nspl.xyplot is the most important method to define a plot in Cartesian coordinate systems,
- org.nspl.data.DataSource. All data must be supplied as a DataSource. Its main abstraction is an iterator over rows (org.nspl.data.Row) where a row is an indexed sequence of doubles. Each row has the same length in a DataSource. A DataSource may be lazy (e.g. load data from disk on demand).
- org.nspl.Parameters holds common settings governing most plots (axis labels, plot titles, ticks, etc),
- org.nspl.awtrenderer for methods to render the plot with Java AWT into PNG, JPG, PDF or a Java Graphics2D context,
- org.nspl.canvasrenderer for methods to render the plot with Html5 Canvas in the browser.
Premade plot factories for various types of plots:
- org.nspl.xyplot
- org.nspl.xyzplot Experimental 3D plot of a points and line segments mesh
- org.nspl.boxplot
- org.nspl.rasterplot Draws data as a bitmap / raster.
Data renderers:
- org.nspl.point for scatter plots
- org.nspl.line for line plots
- org.nspl.lineSegment for line or graph plots
- org.nspl.bar for bar plots
- org.nspl.area
- org.nspl.boxwhisker for box plots
- org.nspl.polynom
Data sources:
- org.nspl.data.DataTable Generic tabular data source on a row major double array
- There exist implicit conversion methods to provide DataSource views on
tuples of Doubles or other types from the standard library. Most of
these are not copying. They are imported with
import org.nspl._
import. - org.nspl.data.DataMatrix Data is viewed as a bitmap/raster: first dimension is x, second is y coordinates, third is color value
- org.nspl.saddle provides interface from Saddle types.
The more general scene graph and layout functionality of the library is exposed via:
- org.nspl.ShapeElem to describe a shape,
- org.nspl.TextBox to describe a text box,
- the
sequence()
method groups multiple elements in a sequence together e.g.sequence(List(elem1,elem2),VerticalStack)
, - the
group
methods group multiple elements together e.g.group(elem1,elem2,VerticalStack)
, one for each arity - Implementations of the org.nspl.Layout trait e.g. org.nspl.TableLayout
- Alignment helpers in org.nspl.Align
- Subclasses of org.nspl.Shape eg. org.nspl.Rectangle , org.nspl.Ellipse, org.nspl.SimplePath, org.nspl.Path
- org.nspl.fitToBounds, org.nspl.fitToWidth, org.nspl.fitToHeight methods
Rendering contexts:
- org.nspl.canvasrenderer for Html5 Canvas. This context is interactive with support for panning and zooming. See org.nspl.canvasrenderer.render
- org.nspl.awtrenderer for various format on the JVM. e.g see methods
like
org.nspl.awtrenderer.pdfToFile
- org.nspl.scalatagrenderer for SVG plots (Scala.js and JVM). See org.nspl.scalatagrenderer.renderToScalaTag
Attributes
package org.nspl.data