Did you know ... | Search Documentation: |
Packs (add-ons) for SWI-Prolog |
Title: | A library to plot data using gnuplot. |
---|---|
Rating: | Not rated. Create the first rating! |
Latest version: | 0.0.1 |
SHA1 sum: | 7407257bef7f21770117d8bac99bda4019e3c666 |
Author: | Damiano Azzolini <damiano.azzolini@unife.it> |
Download URL: | https://github.com/damianoazzolini/plplot.git |
No reviews. Create the first review!.
Version | SHA1 | #Downloads | URL |
---|---|---|---|
0.0.1 | 1aaa8b9303232c6d7962e719b7f2a61728250e97 | 6 | https://github.com/damianoazzolini/plplot.git |
1169c738a8c4069c6cfb6ec996c63ecabdb39422 | 6 | https://github.com/damianoazzolini/plplot.git | |
7407257bef7f21770117d8bac99bda4019e3c666 | 10 | https://github.com/damianoazzolini/plplot.git | |
6ed04386af348d4e088b3c511c2e84fbe0757b13 | 48 | https://github.com/damianoazzolini/plplot.git |
Plot graphs using prolog and gnuplot.
gnuplot must be installed and in the path.
To check if gnuplot is installed type: `command -v gnuplot`. If nothing is printed, this means that gnuplot is missing.
You can download it from http://www.gnuplot.info/download.html and then follow the instructions in the folder.
Usually you need other libraries to install gnuplot as libwxgtk3.0-dev
libpango1.0-dev
and libreadline5-dev
.
plplot can be installed using pack_install/1
$ swipl ?- pack_install(plplot).
Still does not work on Windows
$ swipl
?- use_module(library(plplot))
.
?- plot_point('Title',[1.0, 2.0, 3.0, 4.0, 5.0],[5.0 ,3.0, 1.0, 3.0, 5.0])
.
The result should be something like: !Screenshot
It's simple: the commands are saved in a file named commands.txt
.
The data are saved in a file named data.temp
.
Then gnuplot is called passing those two files.
To use the program without downloading the package with pack_install/1 you can do:
or
/usr/lib/swi-prolog/include/`.test.pl
like this:
:- load_foreign_library(plplot). test_p:- plot_point('Title',[1.0, 2.0, 3.0, 4.0, 5.0],[5.0 ,3.0, 1.0, 3.0, 5.0]).
$ swipl test.pl ?- test_p.
Pull requests, issues or whatever you prefer.
Pack contains 11 files holding a total of 47.0K bytes.