Hi, I just received an e-mail as an answer to the question below, which made me 'investigate' some more. >Furthermore, I was wondering about the something associated for drawn >objects. I've been rereading the ROOT-documentation ("Overview") and I >found the follwing, on page 35 How to Draw Objects: > >An instruction Object->Draw() in fact does not draw directly. It simply >adds a reference (...) This means that if the content of object changes, >your picture will change. > >This is not true, at least not for "stack" based TH1F and TF1. (I didn't >check how it exactly works with heap based ones.) It turned out that one has to call Modified(1) of the canvas in which the Histogram appears. In command-line mode, this result in an automatical update of the canvas, since the Update() methods of the canvases are called after execution of each line. I can image the want for the Modified flag for object which are IN the canvas, but for the canvas itself this seems a bit strange, since the call MyCanvas->Modified(1) apparently (ALWAYS) needs to proceed a call to MyCanvas->Update(), to force the update of the canvas. I don't know about the technicalities, but I would propose to either set the Modified flag of a canvas to kTRUE every time something in the canvas is modified or to arrange that a call to Update always checks the Modified flags of the drawn objects (regardless of the Modified-flag of the canvas). Does anyone disagree??? Ciao, Marco van Leeuwen
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:39 MET