Hi Franz,
A short example
Rene Brun
void manyp() {
TCanvas *c1 = new TCanvas("c1");
TMarker *m;
TRandom r;
for (Int_t i=0;i<10000;i++) {
Double_t x = r.Gaus(0.5,0.1);
Double_t y = r.Gaus(0.5,0.1);
m = new TMarker(x,y,2);
m->Draw(); //add to the pad structure
m->Paint(); //paint on the pixmap
if (i%30 == 0) c1->Flush(); //flush the pixmap
}
}
On Tue, 14 May 2002, Franz [ISO-8859-1] Pröbst wrote:
> Hi,
>
> I am using root to make a number of simple online displays for a DAQ.
> The displays are shown as pads in a single canvas. Some of the pads show
> scatter plots, others histograms or the time dependence of some quantity
> as a line.
>
> In the scatter plots I add new acquired points as TMarker objects.
> TMarker *m =new TMarker(x,y,style);
> m->Draw();
> c1->Update;
>
> The c1->Update redraws all objects in the pad. This can take a long time
> and a considerable fraction of the CPU time when there are already many
> points in sevearal pads. Is there a way that only the last point is
> added without redrawing the other points already there?
>
>
> In the line plots I just add a line segment connecting the newly
> acquired point with the previeous. It would also be nice not to redraw
> the whole line.
>
>
> The active pad is decorated with a red frame. Is there a way to switch
> off this decoration. The pads are updated relatively fast and the random
> jumping of the red box is a little bit disturbing.
>
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:53 MET