Merge branch 'master' of https://github.com/dbalazs92/BM1D
This commit is contained in:
commit
2e18948851
|
@ -23,7 +23,9 @@ class Plotter
|
|||
{
|
||||
public:
|
||||
Plotter(bool draw);
|
||||
~Plotter();
|
||||
void Plot(Int_t numRuns, Int_t nSteps, std::vector<Double_t> t, std::vector<Double_t> x);
|
||||
TMultiGraph * GetTmultiGraph();
|
||||
|
||||
private:
|
||||
bool draw;
|
||||
|
|
|
@ -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<Double_t> t, std::vector<Double_t> x)
|
||||
{
|
||||
mg->SetTitle("BM1D");
|
||||
|
@ -16,22 +29,21 @@ void Plotter::Plot(Int_t numRuns, Int_t nSteps, std::vector<Double_t> 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");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue