2014-02-10 11:22:56 +00:00
|
|
|
#include <iostream>
|
2014-03-13 18:51:01 +00:00
|
|
|
#include <LatAnalyze/CompiledFunction.hpp>
|
|
|
|
#include <LatAnalyze/Math.hpp>
|
|
|
|
#include <LatAnalyze/Plot.hpp>
|
2014-02-10 11:22:56 +00:00
|
|
|
|
|
|
|
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");
|
2014-02-10 11:22:56 +00:00
|
|
|
cout << p << endl;
|
|
|
|
p.display();
|
|
|
|
|
|
|
|
return EXIT_SUCCESS;
|
|
|
|
}
|