Histogram is Single Column?

I want to draw histogram from these data But my hostogram has single column How can I improve my graph
My code is here:

{
  TTree *t = new TTree("t", "a tree");
  t->ReadFile("a.csv", "v/D");
  Double_t v_min = t->GetMinimum("v");
  Double_t v_max = t->GetMaximum("v");
  Int_t n = 100;
  Double_t dv = (v_max - v_min) / n;
#if 1 /* 0 or 1 */
  TH1D *h = new TH1D("h", "a histogram",
                     (n + 2), (v_min - dv), (v_max + dv));
#else /* 0 or 1 */
  TH1D *h = new TH1D("h", "a histogram",
                     n, (v_min - dv / n), (v_max + dv / n));
#endif /* 0 or 1 */
  t->Project("h", "v");
  h->Draw();
}

And my data is here
here

Thank you but after this line

#if 1 /* 0 or 1 */
  TH1D *h = new TH1D("h", "a histogram",
                     (n + 2), (v_min - dv), (v_max + dv));
```My program closed automatically

How do you run your macro?
Try:
root MyMacro.cxx
or:
root [0] .x MyMacro.cxx

I dont understand
I am using this

After this line
#if 1 /* 0 or 1 */ TH1D *h = new TH1D("h", "a histogram", (n + 2), (v_min - dv), (v_max + dv));
Program gived an error and than program closed automatically

What was the error given?

I can not see because closed very fast

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.