Re: ROOT crashes during scatter plot

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed May 13 1998 - 10:03:01 MEST


Wolfgang Korsch wrote:
> 
> Hi Rooters,
>  I have a large sample of data (>1.5e6 evts) and I want to generate
> scatter plots. Using the command
> 
> root> ntuple.Draw("y:x");
> 
> works fine, but displays only the first (20,000 ?) events. That's
> ok, then I do
> 
> root> ntuple.SetEstimate(1500000);
> root> ntuple.Draw("y:x");
> 
> and I get either this error
> 
> ----------------
> Error in <RootX11IOError>: fatal X11 error (connection to server lost?!)

When using the syntax ntuple.Draw("y:x"), Root keeps in memory
the arrays X and Y and displays the arrays via a TPolyMaker object.
This keeps the original precision of the data points.
However in case of a large number of points, this may endup in
a memory problem. From the X and Y arrays, Root creates new
arrays of points converted to pixel coordinates and pass this arrays
to the X11 system. Your X11 server must have enough memory
to display these arrays. This is a typical problem with X terminals.
In your case, to circumvent this memory limitation, you should
create a 2-D histogram, project the ntuple in this histogram.
example:
   TH2F h2("h2","test",40,0,1,40,-6,6);
   ntuple.Draw("y:x>>h2");
In this case, h2 is drawn by generating a number of dots per cell
proportional to the cell content. Once you have h2 filled,
you can also draw it with different drawing options.
This second technique requires less memory than the first one
in case of a large number of entries in a ntuple.

Rene Brun



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