Example of a graph of data moving in time.
Use the canvas "File/Quit" to exit from this example
if (np > 1000) np = 1000;
Double_t rr[1000], phi[1000], dr[1000], size[1000];
Double_t xmin = -10, xmax = 10, ymin = -10, ymax = 10;
g->
SetTitle(
"TGraphTime demo;X domain;Y domain");
for (i=0;i<np;i++) {
rr[i] = r.
Uniform(0.1*xmax,0.2*xmax);
if (rc > 0.3) color[i] =
kBlue;
}
for (s=0;s<nsteps;s++) {
for (i=0;i<np;i++) {
if (i==np-1) g->
Add(
new TArrow(xmin,ymax,xx,yy,0.02,
"-|>"), s);
}
}
TFile f(
"gtime.root",
"recreate");
}
- Author
- Olivier Couet
Definition in file gtime.C.