Re: drawing option for 2d plots

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed May 14 1997 - 08:59:36 MEST


Wolfgang Korsch wrote:
> 
>    Hi,
>      I would like to connect points with a line in a 2d plot.
>      How can I do that?
> 

If you want to superimpose a polyline on top of an existing plot
(1-d or 2-d), you can use the TGraph class.
   gr = new TGraph(n, x, y)
creates a graph with the n points defined in the arrays x and y.
To draw the graph
  Root > gr->Draw("L")

You could also use the TPolyLine class, but the TGraph class
has more drawing opotions and it also works for log scales.

Rene Brun



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:18 MET