Print

Print


You have to create the ScatterPlot and store a reference to it in a
variable, then use that variable to fill your histogram.

class MyDriver extends Driver
{
     private ScatterPlot myscat = new ScatterPlot("title");

     public void process(LCDEvent e)
     {
         ...

         double x = whatever;
         double y = whenever;

         scat.fill(x,y);
     }	
}

In the case of the Histogram class (capital H) you can do exactly the
same thing, but we created the convenience method histogram (lower case
h) in class EventHandler which makes it possible to create and fill
histograms with a single line of code. We will add a similar method for
scatterplots in the next JAS release.

Tony

> -----Original Message-----
> From: Robert J. Wilson [mailto:[log in to unmask]]
> Sent: Thursday, April 22, 1999 12:58 PM
> To: lcd-sim discussion list
> Subject: ScatterPlot
> 
> 
> How does one use the ScatterPlot method?
> 
> At compile time it complains that it is not a method of my analysis
> class. I thought it was in the same package as histogram which works
> fine (I have:  import hep.analysis.*).
> 
>  Note: the web documentation refers to Histogram class, but histogram
> (lowercase "h") is need. I tried  ScatterPlot with lowercase s but it
> didn't help.
> 
> Thanks,
> Bob
> 
> --
> ********************
> Robert J. Wilson
> Professor of Physics
> Department of Physics
> Colorado State University
> Fort Collins, CO 80523
> Phone:  (970) 491 5033
> Fax:      (970) 491 7947
> ********************
> 
>