I’m making a graph that has negative and positive Y values. TGraph makes a line at Y=0, the X axis is properly drawn at around Y= -0.2, but then I get this annoying line at Y=0 that means nothing in my graph.
Does anyone know how to get rid of it?
Javier
One possible way:
{ c1 = new TCanvas("c1","c1",200,10,700,500); const Int_t n = 50; Double_t x[n], y[n]; for (Int_t i=0;i<n;i++) { x[i] = i*0.1; y[i] = 100*sin(x[i]+0.2); } c1->DrawFrame(0, -110, 2, 110); gr = new TGraph(n,x,y); gr->Draw("L*"); }
thank you very much.