Hi Valery, I have reimplemented this part of TGraph::PaintGrapHist to use dynamic arrays, and remove the limitation of NPMAX. Fix now in CVS. Rene Brun Valeri Fine wrote: > > Hello > > > In the hsimple demo and most TH1 drawings we have one or several vertical lines in the middle of > > the histogram: (the figure below was just copied/pasted to/from clipboard - no fiddling around > > with ps > tools any more!!!): > > As I expected this has nothing to do with any TVirtualX (Qt / non-Qt) implementation > rather with a feature of TGraph::PaintGrapHist method: > > http://root.cern.ch/root/htmldoc/src/TGraph.cxx.html#TGraph:PaintGrapHist > > This method uses the global static arrays: > > (see: http://root.cern.ch/root/htmldoc/src/TGraph.cxx.html ) > > const Int_t NPMAX = 2052; > > static Double_t xwork[NPMAX]; > static Double_t ywork[NPMAX]; > static Double_t xworkl[NPMAX]; > static Double_t yworkl[NPMAX]; > > to keep temporary the coordinates of the polylines to paint the histograms. > (By the way this feature must crash any attempt to use the histograms painting > from the concurrent threads). > > One can see these arrays are 2052 (?) words long. By some reason PaintGrapHist > method is forced to use the first 99 (!) words only. > The last means if the histogram has more then 99 bins it will be painted in several steps. > As result (depends of the low-level graphics system) some "separation lines" are shown up. > I have removed 99 words restriction by replacing the line > > const Int_t NPMXFA= 99; > > with > > const Int_t NPMXFA= NPMAX; > > and the artificial lines you was complaining about disappeared. > > May be ROOT team can fix this in the ROOT repository. For me it would be safe to use > the heap allocated TArrayD instead.This can be as long as one needs. > > I mean instead of > > static Double_t xwork[NPMAX]; > > one should introduce: > > TArrayD xwork(npoints); > > Why not ? > > > I could play with the GraphicsEditor and most things work as expected. Had some difficulties with > > the polyline drawing. When I tried to delete the polyline object with the rightclickmenu->Delete > > the TOption dialog box came up and froze the machine (even CTRL-Alt-Del didn't work - was forced to > > a reboot). > > > That doesn't happen often with win2k (haven't had system freeze crashes in several weeks if > > not months!). > > I was not able to reproduce your troubles (W2K computer) so I still suspect you have "strange" version > of VC++ run-time MCVSRT.DLL on your machine. > > I am keeping to investigate the problem you reported. > > Thank you, > Valeri.
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:40 MET