/nspl

pure scala plotting library

Primary LanguageScalaMIT LicenseMIT

New Scala Plotting Library

Scala.js

2d Plotting Library for Scala (including scala-js)

Creates scatter, line, contour, raster, barplots and boxplots, histograms, density plots. Composite figure of multiple plots.

Renders to

Minimal dependencies (VectorGraphics2D for PDF output).

Convenient interface for SADDLE data structures.

Ability to use streams of data without keeping them in memory, thus can create plots from huge files to raster output.

Easily extendible, typesafe scene graph.

Text labels may use any font accessible to the JVM or the browser. Font widths are properly measured.

Simple user interaction: panning and zooming.

See canvas/src/main/scala/org/nspl/test.scala for Html5 Canvas examples. See saddle/src/test/scala/plots/plots.test.scala for JVM examples.

Usage

  • JVM AWT backend: libraryDependencies += "io.github.pityka" %% "nspl-awt" % "0.0.???"
  • JVM SVG via scalatags: libraryDependencies += "io.github.pityka" %% "nspl-scalatags-jvm" % "0.0.???"
  • scala-js svg via scalatags: libraryDependencies += "io.github.pityka" %% "nspl-scalatags-js" % "0.0.???"

Alternatives

See the excellent java graphing library: GRAL, which inspired the design of this library.