|
| 1 | +# JSPlot |
| 2 | + |
| 3 | +JSPlot is an open-source Javascript graph-plotting and vector-graphics library, designed for embedding scientific charts |
| 4 | +in websites. |
| 5 | + |
| 6 | +The full source code is available in this GitHub repository, in the `src` directory. |
| 7 | +A [gallery of example plots](https://jsplot.dcford.org.uk/demos.php), together |
| 8 | +with [API documentation](https://jsplot.dcford.org.uk/documentation.php) is available on |
| 9 | +the [JSPlot website](https://jsplot.dcford.org.uk/). A minified version of the source code is available |
| 10 | +here: https://jsplot.dcford.org.uk/js/jsplot.min.js |
| 11 | + |
| 12 | +### License |
| 13 | + |
| 14 | +This code is distributed under the Gnu General Public License (GPL v3). It is (C) |
| 15 | +Dominic Ford 2019 - 2021. |
| 16 | + |
| 17 | +### Plotting options |
| 18 | + |
| 19 | +JSPlot supports a wide range of 2D and 3D chart types, which are designed to look similar to styles often seen in the |
| 20 | +scientific literature. Supported chart types include scatter charts, line charts, bar charts, plots with error bars, and |
| 21 | +more. Data can be either numerical or time stamps, making it easy to plot time-series data along axes which |
| 22 | +automatically render dates and times into an appropriate format. |
| 23 | + |
| 24 | +Options are provided to make plots either static or interactive. In the latter case, the user can click and drag plots |
| 25 | +to scroll the axes or use the mouse wheel to zoom in/out. Such interactive charts are fully compatible with touch-screen |
| 26 | +devices, where pinch gestures are used to zoom. |
| 27 | + |
| 28 | +Supported output media include HTML5 canvas objects, PNG files, and SVG files. |
| 29 | + |
| 30 | +### Directory structure |
| 31 | + |
| 32 | +Within this repository, the code is stored in the following directories: |
| 33 | + |
| 34 | +`src` – This contains all the Javascript source code for JSPlot. |
| 35 | + |
| 36 | +`website` – This contains the PHP source code for the [JSPlot website](https://jsplot.dcford.org.uk/), including |
| 37 | +all the example plots. |
| 38 | + |
| 39 | +`build` – This contains a Python 3 script to build the example website into a form which can be served by an http |
| 40 | +server such as Apache. It compiles the LESS style files into regular CSS, and minifies the Javascript sources into a |
| 41 | +single file. It creates a directory `dist` containing the built website. |
| 42 | + |
| 43 | +### Dependencies |
| 44 | + |
| 45 | +JSPlot requires `jQuery`. |
| 46 | + |
| 47 | +If you wish to build the example website (note that this is not necessary to run JSPlot), you will need to |
| 48 | +install `Python 3`, `nodejs`, `bower`, `uglify-js`, `less`, `less-plugin-clean-css`. The latter four packages can be |
| 49 | +installed via the node package manager (`npm`) as follows: |
| 50 | + |
| 51 | +`npm install -g bower uglify-js less less-plugin-clean-css` |
| 52 | + |
| 53 | +## Author |
| 54 | + |
| 55 | +JSPlot was written by [Dominic Ford](https://dcford.org.uk/) 2019-2021. |
0 commit comments