jas.hist.Rebinnable2DHistogramData
Definition at line 27 of file PlotDataSource.java.
Public Member Functions | |
boolean | isReal () |
double[][] | rebin (int bins, double min, double max, boolean wantErrors, boolean hurry) |
double | getMin () |
double | getMax () |
int | getBins () |
boolean | isRebinnable () |
int | getAxisType () |
String | getTitle () |
String[] | getAxisLabels () |
PlotDataSource (DataPlot plot, double scalef) throws JetWebException | |
JASHistStyle | getStyle () |
void | setStyleDefault () |
Protected Member Functions | |
void | setTheData (double[][] td) |
void | setBins (int i) |
void | setMin (double d) |
void | setMax (double d) |
Private Attributes | |
double[][] | theData |
double | xmin = 0 |
double | xmax = 0 |
int | nbins |
boolean | isRealData |
JASHist1DHistogramStyle | myStyle |
|
Constructs plotDataSource from a dataplot. Each plot contains a Vector of DataPoint objects.
Definition at line 134 of file PlotDataSource.java. References DataPoint.getXMax(), DataPoint.getXMin(), DataPoint.getY(), DataPoint.getYDown(), DataPoint.getYUp(), PlotDataSource.isRealData, PlotDataSource.nbins, PlotDataSource.setStyleDefault(), PlotDataSource.theData, PlotDataSource.xmax, and PlotDataSource.xmin. 00134 { 00135 Vector dataPoints = plot.getDataPoints(); 00136 nbins = dataPoints.size(); 00137 theData = new double[4][nbins]; 00138 for (int i=0;i<nbins;i++){ 00139 DataPoint p = (DataPoint)dataPoints.elementAt(i); 00140 theData[0][i] = p.getY()*scalef; 00141 theData[1][i] = p.getYUp()*scalef; 00142 theData[2][i] = p.getYDown()*scalef; 00143 } 00144 00145 DataPoint first = (DataPoint)dataPoints.firstElement(); 00146 DataPoint last = (DataPoint)dataPoints.lastElement(); 00147 00148 xmax = last.getXMax(); 00149 xmin = first.getXMin(); 00150 00151 if (plot instanceof RealPlot) { 00152 isRealData=true; 00153 } else { 00154 isRealData=false; 00155 } 00156 setStyleDefault(); 00157 }
|
|
Returns the axis labels. Only relevant if the axisType is STRING, otherwise can return null
Definition at line 125 of file PlotDataSource.java. 00125 {
00126 return null;
00127 };
|
|
Returns one of DOUBLE,INTEGER,STRING,DATE or DELTATIME
Definition at line 108 of file PlotDataSource.java. 00108 {
00109 return DataSource.DOUBLE;
00110 };
|
|
Returns the (suggested) number of bins to use
Definition at line 88 of file PlotDataSource.java. 00088 {
00089 return nbins;
00090 };
|
|
Returns the (suggested) maximum value for the X axis
Definition at line 80 of file PlotDataSource.java. 00080 {
00081 return xmax;
00082 };
|
|
Returns the (suggested) minimum value for the X axis
Definition at line 72 of file PlotDataSource.java. 00072 {
00073 return xmin;
00074 };
|
|
get the style attributes for this histogram
Definition at line 196 of file PlotDataSource.java. 00196 { return myStyle; }
|
|
NOT IMPLEMENTED
Definition at line 116 of file PlotDataSource.java. 00116 { 00117 return ""; 00118 };
|
|
Definition at line 34 of file PlotDataSource.java. 00034 {return isRealData;}
|
|
Returns true if the data source is capable of recalculating the bin contents, or false of the interface is not-capable of recalculating the bin contents. In the former case the values returned by getMin, getMax and getBins are just taken to be suggestions, in the latter case they are taken to be fixed in stone.
Definition at line 100 of file PlotDataSource.java. 00100 { 00101 return false; 00102 }
|
|
Called to request the binned data be returned. If the DataSource indicated it was not rebinnable then the bins, min and max arguments are guaranteed to be the same values as returned by getMin(), getMax() and getBins() methods. The routine returns a two dimensional array where the first dimension has the following meaning:
Definition at line 64 of file PlotDataSource.java. 00064 {
00065 return theData;
00066 }
|
|
allows VariableDataSources to set nbins in each source
Definition at line 171 of file PlotDataSource.java. References PlotDataSource.nbins. Referenced by VariableBinSource.VariableBinSource(). 00171 { 00172 nbins = i; 00173 }
|
|
allows VariableDataSources to set xmax in each source
Definition at line 187 of file PlotDataSource.java. References PlotDataSource.xmax. Referenced by VariableBinSource.VariableBinSource(). 00187 { 00188 xmax = d; 00189 }
|
|
allows VariableDataSources to set xmin in each source
Definition at line 179 of file PlotDataSource.java. References PlotDataSource.xmin. Referenced by VariableBinSource.VariableBinSource(). 00179 { 00180 xmin = d; 00181 }
|
|
set style attributes for this histogram as default Definition at line 200 of file PlotDataSource.java. References PlotDataSource.myStyle. Referenced by PlotDataSource.PlotDataSource(), and VariableBinSource.VariableBinSource(). 00200 { 00201 00202 myStyle = new JASHist1DHistogramStyle(); 00203 if (isRealData){ 00204 myStyle.setErrorBarColor(Color.black); 00205 myStyle.setLineColor(Color.black); 00206 myStyle.setDataPointColor(Color.black); 00207 }else{ 00208 myStyle.setErrorBarColor(Color.red); 00209 myStyle.setLineColor(Color.red); 00210 myStyle.setDataPointColor(Color.red); 00211 } 00212 myStyle.setShowHistogramBars(false); 00213 myStyle.setShowDataPoints(true); 00214 myStyle.setShowErrorBars(true); 00215 myStyle.setShowLinesBetweenPoints(false); 00216 myStyle.setDataPointStyle(JASHist1DHistogramStyle.SYMBOL_DOT); 00217 }
|
|
allows VariableDataSources to set data in each source
Definition at line 163 of file PlotDataSource.java. References PlotDataSource.theData. Referenced by VariableBinSource.VariableBinSource(). 00163 { 00164 theData = td; 00165 }
|
|
Definition at line 33 of file PlotDataSource.java. Referenced by PlotDataSource.PlotDataSource(). |
|
Definition at line 190 of file PlotDataSource.java. Referenced by PlotDataSource.setStyleDefault(). |
|
Definition at line 31 of file PlotDataSource.java. Referenced by PlotDataSource.PlotDataSource(), and PlotDataSource.setBins(). |
|
Definition at line 28 of file PlotDataSource.java. Referenced by PlotDataSource.PlotDataSource(), and PlotDataSource.setTheData(). |
|
Definition at line 30 of file PlotDataSource.java. Referenced by PlotDataSource.PlotDataSource(), and PlotDataSource.setMax(). |
|
Definition at line 29 of file PlotDataSource.java. Referenced by PlotDataSource.PlotDataSource(), and PlotDataSource.setMin(). |
Generated Wed Jan 17 09:14:27 GMT 2007