CD3 / gnuplot-in-the-browser

A wasm-compiled version of gnuplot that can run in the browser.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gnuplot-in-the-browser

Gnuplot is a powerful command line plotting program that can be used for quick data analysis or publication quality figures. This project provides some scripts for downloading and compiling Gnuplot to WebAssembly so that it can run in the browser. The source for an example website is included.

The motivation for this project was the Gnuplotter website. It does the same thing, but hasn't been updated is several years and uses Gnuplot version 4. I wanted to be able to give students access to Gnuplot 5 (which has some improved features when it comes to function fitting) without requiring them to install anything, so I learned how to build WebAssembly apps from command line applications.

Quickstart

To build the application, you need to have install the Emscripten SDK. Then run the build script

$ bash ./build.sh

This will download Gnuplot, configure it for an emscripten build, build the WebAssymbly module, and copy all the files needed to run the website into a "deploy" directory. The contents of the deploy directory can be copied directly to a web server.

Two apps are build, one that provides a simple interface to the Gnuplot command line, and another that is designed to let students to simple linear regression without any Gnuplot knowledge.

About

A wasm-compiled version of gnuplot that can run in the browser.


Languages

Language:HTML 83.5%Language:Python 13.8%Language:Shell 2.4%Language:Makefile 0.3%