1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2025-06-17 23:07:05 +01:00

Plot: object to plot a DoubleFunction

This commit is contained in:
2014-03-03 18:33:53 +00:00
parent 2b678ac72a
commit af246dc5d3
3 changed files with 92 additions and 42 deletions

View File

@ -37,14 +37,16 @@ int main(void)
MinuitMinimizer minimizer;
data.fitAllPoints();
p = data.fit(model, minimizer, init, true, Minimizer::Verbosity::Debug);
p = data.fit(model, minimizer, init, true, Minimizer::Verbosity::Normal);
cout << "a= " << p(0) << " b= " << p(1)
<< " chi^2/ndof= " << p.getChi2PerDof() << endl;
// plot result
Plot plot;
plot << LogScale(Axis::y) << PlotData(data);
plot << Color("rgb 'blue'") << PlotFunction(p.getModel(), 0.0, 10.0);
plot.display();
return EXIT_SUCCESS;