Strange error message from TGraphQQ

Hi all,

When calling TGraphQQ::Write() in a loop for different graphs I get the message[quote]Error in : TGraphQQ, discarding: Double_t* fY0, no [dimension][/quote]for the first TGraphQQ I want to write but not for the others. Nevertheless the graph is not empty. It is saved to the file and the contents is available so I have no idea what this means. Nevertheless it is no problem at all, I just was curious what is going on here :slight_smile:

Cheers, Mathias

This problem is now fixed in the CVS version.
Thanks for this report.


Hi Rene,

Thanks for the quick fix, works perfectly for me. But now I am facing another very strange problem. From my understanding of QQ-Graphs they should be strictly increasing. Here is a counter-example of this rule:

The upper plot shows the data as red-filled hist and the theoretical function as black line. The lower plot is the TGraphQQ made from the same data and distribution function. The cirtical part is the lower left one which looks zoomed like this:

This is just one example of a bunch of similar plots. Don’t know what is going on here. Any ideas on that?

Cheers, Mathias

Hi, Mathias,

Could you send the function and the histogram that you are using to get those plots?


Hi Anna,

Please find the datafile at Attached you’ll find a small macro for testing. My root-version is 5.11/06 and I compiled in the CVS versions of TGraphQQ.cxx and TGraphQQ.h.

Thanks, Mathias
qqtest.c (944 Bytes)

Ok, I got it fixed. For everybody interested here’s the corrected code:TCanvas *canvas = new TCanvas("canvas", "qqtest", 0, 0, 600, 800); canvas->Divide(1, 2); TFile *file = new TFile("qqdat.root"); TTree *tree = (TTree*)file->Get("h3"); canvas->cd(1); tree->SetEstimate(tree->GetEntries()); tree->Draw("Decg*TMath::RadToDeg()>>hist(40,30,70)", "1/cos(Decg)"); TF1 *fcn = new TF1("fcn", &fcn_xpsr, -90, 90, 1); fcn->SetParameter(0, 800); hist->Fit(fcn); fcn->SetRange(49.0994-18.0, 49.0994+18.0); canvas->cd(2); TGraphQQ *graph = new TGraphQQ(tree->GetSelectedRows(), tree->GetV1(), fcn); graph->Draw("al");There were problems both in x and y. The problem in x could be fixed by fcn->SetRange(49.0994-18.0, 49.0994+18.0);The TF1::GetQuantiles seems to have problems when the function becomes zero. The specified ranges is the range where the function is not zero. The problem in y was fixed withtree->SetEstimate(tree->GetEntries());I don’t want to comment that since this was a problem I asked for in a former post :blush:

Cheers, Mathias