pityka/nspl


pure scala plotting library

https://pityka.github.io/nspl/

License: Other

Language: Scala

Keywords: html5-canvas, jvm, plot, raster, scala, scala-plotting-library, scalatags, svg


New Scala Plotting Library

Scala.js

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

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.

Scala Native

You will need lodepng, glfw3 and nanovg. For nanovg compile and install a file like this:

#define GLFW_INCLUDE_GLCOREARB
#define GLFW_INCLUDE_GLEXT
#include <GLFW/glfw3.h>
#include "nanovg.h"
#define NANOVG_GL3_IMPLEMENTATION
#include "nanovg_gl.h"

In cli/ there is an experimental command line interface.

Project Statistics

Sourcerank 9
Repository Size 2.44 MB
Stars 33
Forks 4
Watchers 5
Open issues 1
Dependencies 0
Contributors 1
Tags 12
Created
Last updated
Last pushed

Top Contributors See all

Istvan Bartha

Packages Referencing this Repo

io.github.pityka:nspl-shared-js_sjs0.6_2.12
nspl-shared-js
Latest release 0.0.19 - Published - 33 stars
io.github.pityka:nspl-core-js_sjs0.6_2.12
nspl-core-js
Latest release 0.0.19 - Published - 33 stars
io.github.pityka:nspl-core_2.12
nspl-core
Latest release 0.0.19 - Updated - 33 stars
io.github.pityka:nspl-scalatags-js_sjs0.6_2.12
nspl-scalatags-js
Latest release 0.0.19 - Updated - 33 stars
io.github.pityka:nspl-shared-jvm_2.11
nspl-shared-jvm
Latest release 0.0.19 - Updated - 33 stars
io.github.pityka:nspl-shared-js_sjs0.6_2.11
nspl-shared-js
Latest release 0.0.19 - Updated - 33 stars
io.github.pityka:nspl-shared-jvm_2.12
nspl-shared-jvm
Latest release 0.0.19 - Published - 33 stars
io.github.pityka:nspl-awt_2.12
nspl-awt
Latest release 0.0.19 - Updated - 33 stars
io.github.pityka:nspl-scalatags-jvm_2.12
nspl-scalatags-jvm
Latest release 0.0.19 - Updated - 33 stars
io.github.pityka:nspl-core-canvas-js_sjs0.6_2.12
nspl-core-canvas-js
Latest release 0.0.17 - Published - 33 stars

Recent Tags See all

0.0.16 April 09, 2017
0.0.15 April 02, 2017
0.0.14 January 07, 2017
0.0.13 December 27, 2016
0.0.12 October 26, 2016
0.0.11 October 17, 2016
0.0.8 October 15, 2016
0.0.5 June 30, 2016
0.0.4 June 30, 2016
0.0.3 June 28, 2016
0.0.2 June 28, 2016
0.0.1 June 27, 2016

Something wrong with this page? Make a suggestion

Last synced: 2018-09-27 19:31:01 UTC

Login to resync this repository