When writing thesis or paper in LaTeX and you have done data analysis in C++ or don't like the default Matlab graphics then CTikz can be used to create TikZ files for your LaTeX document. This C++ class CTikz creates TikZ files and as preview a pdf of the graphic. It is suitable to create charts out of a C data array (double x[10]) or data vector (std::vector<double> x) from C++.
CTikz tikz;
const int N = 100;
double x[N];
double y[N];
// ...
tikz.addData(x, y, N);
tikz.createTikzPdf("example.tikz");
Complete examples in main.cpp.
- clone project and change directory
> git clone https://github.com/mchlbrnhrd/CTikz
> cd CTikz
- compile
> make
- execute test code:
> cd bin
> ./CTikzApp
Four example tikz files will be created with corresponding pdf files.