Problem in making a TGraph plot

Hi to all,

i am trying to produce a simple plot to draw some points on a three-dimensional space.

[code]void macro(){

TCanvas* tc = new TCanvas(“tc”, “points”, 800, 600);
TGraph2D* tg = new TGraph2D(3);

tg->SetPoint(0, 5, 5, 0);
tg->SetPoint(1, 10, 5, 0);
tg->SetPoint(2, 10, 10, 0);

tg->SetMarkerStyle(6);
tg->SetTitle(“points”);
tg->Draw(“pcol”);
}[/code]

When i execute it with ROOT 5.34/25 i get the following error:

[quote]Processing macro.C…
Error in TView3D::ResetView: Error in min-max scope
Error in TView3D::ResetView: Error in min-max scope
Error in TView3D::ResetView: Error in min-max scope
Error in TView3D::SetRange: problem setting view
Error in TView3D::ResetView: Error in min-max scope
Error in TCanvas::Range: illegal world coordinates range: x1=0.000000, y1=0.000000, x2=-0.000000, y2=-0.000000
Error in TCanvas::RangeAxis: illegal axis coordinates range: xmin=0.000000, ymin=0.000000, xmax=-0.000000, ymax=-0.000000
[/quote]

Changing a single z value of SetPoint to != 0 correctly produces the plot.

I believe this is related to that problem:

[url]Cannot make a TGraph2D plot

yes it is the same sort of thing. I will check.

Now fixed in 6.04, 6.02 and 5.34:
root.cern.ch/gitweb?p=root.git; … 69c0fe2ade
Thanks for reporting.

Thanks for the quick fix!