strange behaviour of P0 drawing option of TGraph2D

From: Alexander Mann <amann_at_uni-goettingen.de>
Date: Thu, 17 Dec 2009 15:09:29 +0100

Hello,

I found a strange behaviour of the "P0" option when plotting TGraph2d (v5.20). If you execute the macro in the attachment once with "surf1" as draw option in line 85 and once with "tri1", and then compare the resulting drawings, you'll find that the small white circles indicating the data points are at the same position for both graphs, whereas the grid and the tics of the axes change. I.e. the value read off for the markers changes although it should be the same in both cases as the data is the same.

Is this a bug in the visualisation or do I misinterpret the meaning of the markers?

Best regards,
Alexander

{
//=========Macro generated from canvas: c1/ //========= (Thu Dec 17 12:21:25 2009) by ROOT version5.20/00

   TCanvas *c1 = new TCanvas("c1", "",15,33,700,500);    gStyle->SetOptFit(1);
   gStyle->SetOptStat(0);
   c1->Range(-1.104145,-1.207407,0.9989885,1.207407);    TView *view = TView::CreateView(1);
   view->SetRange(0.160357,0.2,-1,0.939336,1,3.477121);

   c1->SetFillColor(0);
   c1->SetBorderMode(0);
   c1->SetBorderSize(2);
   c1->SetLogz();
   c1->SetTheta(45);
   c1->SetPhi(210);
   c1->SetLeftMargin(0.15);
   c1->SetFrameBorderMode(0);
   

   TGraph2D *graph2d = new TGraph2D(60);    graph2d->SetName("x");
   graph2d->SetTitle("x");
   x->SetDirectory(0);

   graph2d->SetMarkerStyle(24);
   graph2d->SetPoint(0,0.39123,0.2,2817.76);
   graph2d->SetPoint(1,0.614452,0.2,828.121);
   graph2d->SetPoint(2,0.863075,0.2,371.3695);
   graph2d->SetPoint(3,0.847473,0.26,61.87348);
   graph2d->SetPoint(4,0.602766,0.264,95.37362);
   graph2d->SetPoint(5,0.378963,0.27,200.1292);
   graph2d->SetPoint(6,0.214286,0.28,234.2173);
   graph2d->SetPoint(7,0.837574,0.32,20.89717);
   graph2d->SetPoint(8,0.595528,0.328,30.13138);
   graph2d->SetPoint(9,0.259281,0.34,87.08);
   graph2d->SetPoint(10,0.371558,0.34,65.03943);
   graph2d->SetPoint(11,0.531143,0.34,32.75);
   graph2d->SetPoint(12,0.763042,0.34,14.34);
   graph2d->SetPoint(13,0.939336,0.34,11.67);
   graph2d->SetPoint(14,0.199205,0.36,71.55652);
   graph2d->SetPoint(15,0.830734,0.38,8.90469);
   graph2d->SetPoint(16,0.590604,0.392,11.70933);
   graph2d->SetPoint(17,0.3666,0.41,25.30205);
   graph2d->SetPoint(18,0.188982,0.44,26.90468);
   graph2d->SetPoint(19,0.227921,0.44,25.95);
   graph2d->SetPoint(20,0.326618,0.44,20.37);
   graph2d->SetPoint(21,0.466901,0.44,11.05);
   graph2d->SetPoint(22,0.670751,0.44,4.619);
   graph2d->SetPoint(23,0.825723,0.44,3.552);
   graph2d->SetPoint(24,0.587036,0.456,5.187222);
   graph2d->SetPoint(25,0.363046,0.48,11.24122);
   graph2d->SetPoint(26,0.821894,0.5,2.696218);
   graph2d->SetPoint(27,0.181568,0.52,11.59375);
   graph2d->SetPoint(28,0.584332,0.52,2.54287);
   graph2d->SetPoint(29,0.360375,0.55,5.424467);
   graph2d->SetPoint(30,0.818874,0.56,1.785665);
   graph2d->SetPoint(31,0.197836,0.584,6.089);
   graph2d->SetPoint(32,0.283504,0.584,5.121);
   graph2d->SetPoint(33,0.40527,0.584,3.173);
   graph2d->SetPoint(34,0.582212,0.584,1.317);
   graph2d->SetPoint(35,0.716728,0.584,0.9801);
   graph2d->SetPoint(36,0.175933,0.6,5.450028);
   graph2d->SetPoint(37,0.358293,0.62,2.805125);
   graph2d->SetPoint(38,0.816429,0.62,1.398067);
   graph2d->SetPoint(39,0.580506,0.648,0.7709337);
   graph2d->SetPoint(40,0.171499,0.68,2.759517);
   graph2d->SetPoint(41,0.814411,0.68,1.286587);
   graph2d->SetPoint(42,0.356625,0.69,1.539467);
   graph2d->SetPoint(43,0.579102,0.712,0.462955);
   graph2d->SetPoint(44,0.812716,0.74,1.52801);
   graph2d->SetPoint(45,0.167915,0.76,1.493183);
   graph2d->SetPoint(46,0.173422,0.76,1.487);
   graph2d->SetPoint(47,0.248519,0.76,1.296);
   graph2d->SetPoint(48,0.355258,0.76,0.8629);
   graph2d->SetPoint(49,0.510365,0.76,0.3967);
   graph2d->SetPoint(50,0.628281,0.76,0.2902);
   graph2d->SetPoint(51,0.577927,0.776,0.2930815);
   graph2d->SetPoint(52,0.354118,0.83,0.5207868);
   graph2d->SetPoint(53,0.164957,0.84,0.848156);
   graph2d->SetPoint(54,0.236388,0.84,0.7424);
   graph2d->SetPoint(55,0.337918,0.84,0.5232);
   graph2d->SetPoint(56,0.485454,0.84,0.2384);
   graph2d->SetPoint(57,0.597614,0.84,0.1792);
   graph2d->SetPoint(58,0.162473,0.92,0.501665);
   graph2d->SetPoint(59,0.160357,1,0.3033417);
   

   graph2d->Draw("surf1"); //tri1 or surf1    

   graph2d = new TGraph2D(60);
   graph2d->SetName("x");
   graph2d->SetTitle("x");
   x->SetDirectory(0);

   graph2d->SetMarkerStyle(24);
   graph2d->SetPoint(0,0.39123,0.2,2817.76);
   graph2d->SetPoint(1,0.614452,0.2,828.121);
   graph2d->SetPoint(2,0.863075,0.2,371.3695);
   graph2d->SetPoint(3,0.847473,0.26,61.87348);
   graph2d->SetPoint(4,0.602766,0.264,95.37362);
   graph2d->SetPoint(5,0.378963,0.27,200.1292);
   graph2d->SetPoint(6,0.214286,0.28,234.2173);
   graph2d->SetPoint(7,0.837574,0.32,20.89717);
   graph2d->SetPoint(8,0.595528,0.328,30.13138);
   graph2d->SetPoint(9,0.259281,0.34,87.08);
   graph2d->SetPoint(10,0.371558,0.34,65.03943);
   graph2d->SetPoint(11,0.531143,0.34,32.75);
   graph2d->SetPoint(12,0.763042,0.34,14.34);
   graph2d->SetPoint(13,0.939336,0.34,11.67);
   graph2d->SetPoint(14,0.199205,0.36,71.55652);
   graph2d->SetPoint(15,0.830734,0.38,8.90469);
   graph2d->SetPoint(16,0.590604,0.392,11.70933);
   graph2d->SetPoint(17,0.3666,0.41,25.30205);
   graph2d->SetPoint(18,0.188982,0.44,26.90468);
   graph2d->SetPoint(19,0.227921,0.44,25.95);
   graph2d->SetPoint(20,0.326618,0.44,20.37);
   graph2d->SetPoint(21,0.466901,0.44,11.05);
   graph2d->SetPoint(22,0.670751,0.44,4.619);
   graph2d->SetPoint(23,0.825723,0.44,3.552);
   graph2d->SetPoint(24,0.587036,0.456,5.187222);
   graph2d->SetPoint(25,0.363046,0.48,11.24122);
   graph2d->SetPoint(26,0.821894,0.5,2.696218);
   graph2d->SetPoint(27,0.181568,0.52,11.59375);
   graph2d->SetPoint(28,0.584332,0.52,2.54287);
   graph2d->SetPoint(29,0.360375,0.55,5.424467);
   graph2d->SetPoint(30,0.818874,0.56,1.785665);
   graph2d->SetPoint(31,0.197836,0.584,6.089);
   graph2d->SetPoint(32,0.283504,0.584,5.121);
   graph2d->SetPoint(33,0.40527,0.584,3.173);
   graph2d->SetPoint(34,0.582212,0.584,1.317);
   graph2d->SetPoint(35,0.716728,0.584,0.9801);
   graph2d->SetPoint(36,0.175933,0.6,5.450028);
   graph2d->SetPoint(37,0.358293,0.62,2.805125);
   graph2d->SetPoint(38,0.816429,0.62,1.398067);
   graph2d->SetPoint(39,0.580506,0.648,0.7709337);
   graph2d->SetPoint(40,0.171499,0.68,2.759517);
   graph2d->SetPoint(41,0.814411,0.68,1.286587);
   graph2d->SetPoint(42,0.356625,0.69,1.539467);
   graph2d->SetPoint(43,0.579102,0.712,0.462955);
   graph2d->SetPoint(44,0.812716,0.74,1.52801);
   graph2d->SetPoint(45,0.167915,0.76,1.493183);
   graph2d->SetPoint(46,0.173422,0.76,1.487);
   graph2d->SetPoint(47,0.248519,0.76,1.296);
   graph2d->SetPoint(48,0.355258,0.76,0.8629);
   graph2d->SetPoint(49,0.510365,0.76,0.3967);
   graph2d->SetPoint(50,0.628281,0.76,0.2902);
   graph2d->SetPoint(51,0.577927,0.776,0.2930815);
   graph2d->SetPoint(52,0.354118,0.83,0.5207868);
   graph2d->SetPoint(53,0.164957,0.84,0.848156);
   graph2d->SetPoint(54,0.236388,0.84,0.7424);
   graph2d->SetPoint(55,0.337918,0.84,0.5232);
   graph2d->SetPoint(56,0.485454,0.84,0.2384);
   graph2d->SetPoint(57,0.597614,0.84,0.1792);
   graph2d->SetPoint(58,0.162473,0.92,0.501665);
   graph2d->SetPoint(59,0.160357,1,0.3033417);
   graph2d->Draw("same p0");
   c1->Modified();

   c1->cd();
   c1->SetSelected(c1);              

} Received on Thu Dec 17 2009 - 15:09:34 CET

This archive was generated by hypermail 2.2.0 : Thu Dec 17 2009 - 17:50:02 CET