1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2024-11-10 00:45:36 +00:00
LatAnalyze/examples/exPlot.cpp

22 lines
538 B
C++
Raw Normal View History

#include <iostream>
2014-03-03 18:34:35 +00:00
#include <latan/CompiledFunction.hpp>
#include <latan/Math.hpp>
#include <latan/Plot.hpp>
using namespace std;
using namespace Latan;
int main(void)
{
Plot p;
2014-03-03 18:34:35 +00:00
p << PlotRange(Axis::x, -5.0, 5.0) << PlotRange(Axis::y, -5.0, 5.0);
p << Color("rgb 'blue'") << PlotFunction(StdMath::tgamma, -5, 5);
p << PlotFunction(CompiledDoubleFunction(1, "return cos(x_0)^2;"), -5, 5);
p << Color("rgb 'brown'") << PlotCommand("x**3");
cout << p << endl;
p.display();
return EXIT_SUCCESS;
}