diff --git a/include/Plotter.hh b/include/Plotter.hh index 372c3ea..4522691 100644 --- a/include/Plotter.hh +++ b/include/Plotter.hh @@ -23,7 +23,9 @@ class Plotter { public: Plotter(bool draw); + ~Plotter(); void Plot(Int_t numRuns, Int_t nSteps, std::vector t, std::vector x); + TMultiGraph * GetTmultiGraph(); private: bool draw; diff --git a/src/Plotter.cc b/src/Plotter.cc index 0a944e9..0e91212 100644 --- a/src/Plotter.cc +++ b/src/Plotter.cc @@ -7,8 +7,21 @@ if(draw) { canv = new TCanvas("canc","display",800,400); } +//g1 = new TGraph(); mg = new TMultiGraph(); } + +Plotter::~Plotter() +{ + +} + +TMultiGraph * Plotter::GetTmultiGraph() +{ + return mg; +} + + void Plotter::Plot(Int_t numRuns, Int_t nSteps, std::vector t, std::vector x) { mg->SetTitle("BM1D"); @@ -16,22 +29,21 @@ void Plotter::Plot(Int_t numRuns, Int_t nSteps, std::vector t, std::ve for(int i= 0; i < numRuns; i++) { g1 = new TGraph(nSteps,&t[i*nSteps],&x[i*nSteps]); - - g1->SetLineColor(i+1); - g1->SetTitle("Brownian Movement"); - g1->GetYaxis()->SetTitle("X"); - g1->GetXaxis()->SetTitle("Time"); - g1->SetLineWidth(1); - g1->SetMarkerColor(1); + g1->SetLineColor(i%30+1); + //g1->SetTitle("Brownian Movement"); + //g1->GetYaxis()->SetTitle("X"); + //g1->GetXaxis()->SetTitle("Time"); + g1->SetLineWidth(2); + //g1->SetMarkerColor(1); g1->SetMarkerStyle(1); mg -> Add(g1); } + if(draw) { - g1->Draw(); - mg -> Draw(); + mg -> Draw("APL"); } }