ROOT question

From: Matthew E. Hogan <mh764807_at_ohio.edu>
Date: Wed, 22 Aug 2007 10:11:38 -0400


Hi!

      I'm trying to graph a (presumably) helical data set, but so far all I'm getting it points, and not a connected curve.

My code is:

#include "TH3D.h"
#include "TCanvas.h"
#include <cstdlib>
#include <stdio.h>

gROOT->Reset();

void graph() {
  TPCView = new TCanvas("TPCView", "TPC View", 10, 10, 800, 800);   fHistExN023D = new TH3F("HistExN023D", "HistExN023D", 40.,-32.,32.,40.,-26.,26.,60.,-30., 30.);   FILE * graph;
  graph = fopen("graph.dat", "r");
  char line[16];
  Float_t x, y, z;
  Int_t k;

  for (k=0; k<22; k++)
   {

      fscanf(graph, "%f %f %f", &x, &y, &z);
      cout << x << "," << y << "," << z << endl;
      fHistExN023D->Fill(x, y/10., z/10.);
    }

  fHistExN023D->Draw("C A L P ARR");
}

Is there something I'm doing wrong? Draw("C A L P ARR") looks just like Draw().

Thanks!!!!!!!!

-Matthew E. Hogan

Graduate Research Assistant, Ohio University Department of Physics and Astronomy
251B Clippinger Research Laboratories
Ohio University
Athens, OH 45701-2979 USA
[+1] (740) 593-0991
http://www.phy.ohiou.edu/~hogan/ <http://www.phy.ohiou.edu/%7Ehogan/> Received on Wed Aug 22 2007 - 16:11:51 CEST

This archive was generated by hypermail 2.2.0 : Wed Aug 22 2007 - 17:50:02 CEST