mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2025-04-10 19:20:44 +01:00
plot example update
This commit is contained in:
parent
66af922bc2
commit
0df75d0809
@ -1,4 +1,6 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <latan/CompiledFunction.hpp>
|
||||||
|
#include <latan/Math.hpp>
|
||||||
#include <latan/Plot.hpp>
|
#include <latan/Plot.hpp>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -8,7 +10,10 @@ int main(void)
|
|||||||
{
|
{
|
||||||
Plot p;
|
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;
|
cout << p << endl;
|
||||||
p.display();
|
p.display();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user