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

plot example update

This commit is contained in:
Antonin Portelli 2014-03-03 18:34:35 +00:00
parent 66af922bc2
commit 0df75d0809

View File

@ -1,4 +1,6 @@
#include <iostream>
#include <latan/CompiledFunction.hpp>
#include <latan/Math.hpp>
#include <latan/Plot.hpp>
using namespace std;
@ -8,7 +10,10 @@ int main(void)
{
Plot p;
p << PlotCommand("x**2") << PlotCommand("x**3") << PlotCommand("x**4");
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();