https://github.com/martinruenz/gnuplot-cpp
A trivial gnuplot interface for c++
https://github.com/martinruenz/gnuplot-cpp
cpp gnuplot header-only plotting
Last synced: 4 days ago
JSON representation
A trivial gnuplot interface for c++
- Host: GitHub
- URL: https://github.com/martinruenz/gnuplot-cpp
- Owner: martinruenz
- License: lgpl-3.0
- Created: 2018-02-22T23:38:12.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-08-15T16:13:51.000Z (over 3 years ago)
- Last Synced: 2023-10-20T21:39:34.317Z (over 2 years ago)
- Topics: cpp, gnuplot, header-only, plotting
- Language: C++
- Homepage:
- Size: 35.2 KB
- Stars: 68
- Watchers: 3
- Forks: 24
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gnuplot-cpp
A trivial gnuplot interface for c++.
There are [many](https://github.com/search?l=C%2B%2B&q=gnuplot&type=Repositories&utf8=%E2%9C%93) libraries providing the same solution, such as [gnuplot-iostream](https://github.com/dstahlke/gnuplot-iostream). _gnuplot-cpp_ aims at being lightweight and super easy to use. It functions by piping data to a gnuplot subprocess.
## Features
* Header only
* Lightweight (~50 lines of code)
* Easy to use
## Example usage
```c++
#include "gnuplot.h"
int main(){
GnuplotPipe gp;
gp.sendLine("plot [-pi/2:pi] cos(x),-(sin(x) > sin(x+1) ? sin(x) : sin(x+1))");
return 0;
}
```
Result:
