private void computeRegressionAndAcceptableDeviationData() { acceptableDeviationDataset.removeAllSeries(); regressionDataset.removeAllSeries(); getPlot().removeAnnotation(r2Annotation); if (computedDatas != null) { final ValueAxis domainAxis = getPlot().getDomainAxis(); final double min = domainAxis.getLowerBound(); final double max = domainAxis.getUpperBound(); acceptableDeviationDataset.addSeries(computeAcceptableDeviationData(min, max)); if (scatterPlotModel.showRegressionLine) { regressionDataset.addSeries(computeRegressionData(min, max)); computeCoefficientOfDetermination(); } } }
private void finishScalingUpdate(AxisRangeControl axisRangeControl, ValueAxis newAxis, ValueAxis oldAxis) { if (axisRangeControl.isAutoMinMax()) { newAxis.setAutoRange(false); acceptableDeviationDataset.removeAllSeries(); regressionDataset.removeAllSeries(); getPlot().removeAnnotation(r2Annotation); newAxis.setAutoRange(true); axisRangeControl.adjustComponents(newAxis, 3); newAxis.setAutoRange(false); computeRegressionAndAcceptableDeviationData(); } else { newAxis.setAutoRange(false); newAxis.setRange(oldAxis.getRange()); } }
private void finishScalingUpdate(AxisRangeControl axisRangeControl, ValueAxis newAxis, ValueAxis oldAxis) { if (axisRangeControl.isAutoMinMax()) { newAxis.setAutoRange(false); acceptableDeviationDataset.removeAllSeries(); regressionDataset.removeAllSeries(); getPlot().removeAnnotation(r2Annotation); newAxis.setAutoRange(true); axisRangeControl.adjustComponents(newAxis, 3); newAxis.setAutoRange(false); computeRegressionAndAcceptableDeviationData(); } else { newAxis.setAutoRange(false); newAxis.setRange(oldAxis.getRange()); } }
private void computeRegressionAndAcceptableDeviationData() { acceptableDeviationDataset.removeAllSeries(); regressionDataset.removeAllSeries(); getPlot().removeAnnotation(r2Annotation); if (computedDatas != null) { final ValueAxis domainAxis = getPlot().getDomainAxis(); final double min = domainAxis.getLowerBound(); final double max = domainAxis.getUpperBound(); acceptableDeviationDataset.addSeries(computeAcceptableDeviationData(min, max)); if (scatterPlotModel.showRegressionLine) { final XYIntervalSeries series = computeRegressionData(min, max); if (series != null) { regressionDataset.addSeries(series); computeCoefficientOfDetermination(); } } } }
private void computeChartDataIfPossible() { // need to do this later: all GUI events must be processed first in order to get the correct state SwingUtilities.invokeLater(() -> { if (scatterPlotModel.pointDataSource != null && scatterPlotModel.dataField != null && scatterPlotModel.pointDataSource.getFeatureCollection() != null && scatterPlotModel.pointDataSource.getFeatureCollection().features() != null && scatterPlotModel.pointDataSource.getFeatureCollection().features().hasNext() && scatterPlotModel.pointDataSource.getFeatureCollection().features().next() != null && scatterPlotModel.pointDataSource.getFeatureCollection().features().next().getAttribute( scatterPlotModel.dataField.getLocalName()) != null && getRaster() != null) { compute(scatterPlotModel.useRoiMask ? scatterPlotModel.roiMask : null); } else { scatterpointsDataset.removeAllSeries(); acceptableDeviationDataset.removeAllSeries(); regressionDataset.removeAllSeries(); getPlot().removeAnnotation(r2Annotation); computedDatas = null; } }); }
@Override public void run() { if (scatterPlotModel.pointDataSource != null && scatterPlotModel.dataField != null && scatterPlotModel.pointDataSource.getFeatureCollection() != null && scatterPlotModel.pointDataSource.getFeatureCollection().features() != null && scatterPlotModel.pointDataSource.getFeatureCollection().features().hasNext() && scatterPlotModel.pointDataSource.getFeatureCollection().features().next() != null && scatterPlotModel.pointDataSource.getFeatureCollection().features().next().getAttribute( scatterPlotModel.dataField.getLocalName()) != null && getRaster() != null) { compute(scatterPlotModel.useRoiMask ? scatterPlotModel.roiMask : null); } else { scatterpointsDataset.removeAllSeries(); acceptableDeviationDataset.removeAllSeries(); regressionDataset.removeAllSeries(); getPlot().removeAnnotation(r2Annotation); computedDatas = null; } } });
yAxis.setAutoRange(false); scatterpointsDataset.removeAllSeries(); acceptableDeviationDataset.removeAllSeries(); regressionDataset.removeAllSeries(); getPlot().removeAnnotation(r2Annotation); computedDatas = null;
yAxis.setAutoRange(false); scatterpointsDataset.removeAllSeries(); acceptableDeviationDataset.removeAllSeries(); regressionDataset.removeAllSeries(); getPlot().removeAnnotation(r2Annotation); computedDatas = null;
dataset.removeAllSeries();