Hello! A couple people suggested that I make a more detailed posting to the list...so here it is... First of all, thanks for the replies and sorry for the duplicate postings yesterday. Unfortunately, I am still having difficulties. In summary, my postscript files from programs compiled with the root class library are blank. Freya Blekman suggested a call to Update(), which did not work for me. I have also created the postscript file via the creation of a TPostScript object (instead of using the Print() method of a TCanvas object), which gave the same incorrect results. My difficulty seems to be in compiling the code with the libraries, not in using CINT itself. If I were to run the code in CINT (as Damir suggests below) it works fine. However, when I try to compile code independently of the CINT interpreter, the PostScript file is broken. I upgraded yesterday to 3.03/08 just to make sure...and I'm still having problems. I have attached the (small) PostScript file demonstrating my problem. Also, in case it is useful, I noticed that the "stress.ps" file in the $(ROOTSYS)/test directory that is created is also broken. Only three of the four panels in stress.ps show up, and the fourth is blank as in the file produced from the code below. Thanks for your help, Andrew Steiner On Wed, 4 Sep 2002, Damir Buskulic wrote: > Hi Andrew, > > Works for me (v3.03/08). I removed the #includes since they are loaded > by default in the interpreter. > > Cheers > > Damir > > Andrew Steiner wrote: > > Hello! > > The following code produces a blank Post-Script file (or actually, > > it produces a file which creates the plot and then erases it). Could > > someone let me know what I am doing wrong? My makefile is reproduced > > below, as well as the line which I used to configure root before > > installing it into my user directory. I am using RH 6.1 with egcs-2.91.66. > > I thank the creators for what seems so far to be a fine product. > > > > Thanks, > > Andrew Steiner > > > > ----------------------------Code--------------------------------------- > > #include <stdio.h> > > #include <TCanvas.h> > > #include <Rtypes.h> > > #include <TGraph.h> > > #include <TLatex.h> > > > > int main(void) { > > > > float *xv,*yv; > > xv=new float[2]; > > yv=new float[2]; > > int nlines = 2; > > > > TCanvas *c1; > > TGraph *gr; > > > > xv[0]=1; > > yv[0]=2; > > xv[1]=2; > > yv[1]=4; > > > > c1 = new TCanvas("c1","",0,0,500,500); > > > > c1->SetFillColor(0); > > > > gr = new TGraph(nlines,xv,yv); > > > > gr->SetFillColor(0); > > gr->SetLineColor(1); > > gr->SetLineWidth(1); > > gr->SetMarkerColor(1); > > > > // Make big dots > > gr->SetMarkerStyle(7); > > > > // Remove the title > > gr->SetTitle(""); > > > > // Draw axis and points > > gr->Draw("AP"); > > > > c1->Print("plot.eps"); > > > > return 0; > > } > > > > ---------------------Makefile----------------------------------- > > ROOTLIBS = -L/home/asteiner/root/lib -lCore -lCint -lHist -lGraf \ > > -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix \ > > -lPhysics -lGui -lm -ldl -lpthread -rdynamic > > > > test.o: test.cpp > > g++ -ggdb -c test.cpp -I/home/asteiner/root/include > > > > test: test.o > > g++ -lm -ggdb -o test test.o $(ROOTLIBS) > > > > ------------Configuration------------------------------------------ > > configure linux --prefix=/home/asteiner/root \ > > --libdir=/home/asteiner/root/lib --incdir=/home/asteiner/root/include \ > > --mandir=/home/asteiner/root/man/man1 --etcdir=/home/asteiner/root/etc \ > > --datadir=/home/asteiner/root > > > > > > >
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:07 MET