List of usage examples for org.jfree.chart.plot FastScatterPlot setOutlineStroke
public void setOutlineStroke(Stroke stroke)
From source file:org.fhcrc.cpl.viewer.gui.ProteinMatcherFrame.java
protected void showPredictedHydroTimePlot() { //clone because we're sorting Feature[] regressionMS2FeatureArray = _regressionMS2Features.getFeatures().clone(); Arrays.sort(regressionMS2FeatureArray, new Feature.ScanAscComparator()); int numQualifyingFeatures = 0; for (int i = 0; i < regressionMS2FeatureArray.length; i++) { if (MS2ExtraInfoDef.getPeptideProphet(regressionMS2FeatureArray[i]) >= minPeptideProphet) numQualifyingFeatures++;//from w w w.j a v a 2s . co m } float[][] scatterPlotData = new float[2][numQualifyingFeatures]; int[] sortedScanArray = new int[numQualifyingFeatures]; int arrayIndex = 0; for (int i = 0; i < regressionMS2FeatureArray.length; i++) { if (MS2ExtraInfoDef.getPeptideProphet(regressionMS2FeatureArray[i]) >= minPeptideProphet) { Feature ms2Feature = regressionMS2FeatureArray[i]; scatterPlotData[0][arrayIndex] = (float) AmtUtilities .calculateNormalizedHydrophobicity(MS2ExtraInfoDef.getFirstPeptide(ms2Feature)); // scatterPlotData[1][arrayIndex] = ms2Feature.getScan(); sortedScanArray[arrayIndex] = ms2Feature.getScan(); arrayIndex++; } } MSRun run = (MSRun) ApplicationContext.getProperty(SharedProperties.MS_RUN); double[] timesArrayTemp = AmtUtilities.getTimesForSortedScanArray(run, sortedScanArray); float[] timesArray = new float[timesArrayTemp.length]; for (int i = 0; i < timesArrayTemp.length; i++) timesArray[i] = (float) timesArrayTemp[i]; scatterPlotData[1] = timesArray; FastScatterPlot scatterPlot = new FastScatterPlot(scatterPlotData, new NumberAxis(TextProvider.getText("CALCULATED_HYDROPHOBICITY")), new NumberAxis(TextProvider.getText("TIME"))); scatterPlot.setPaint(Color.BLUE); scatterPlot.setOutlineStroke(new BasicStroke(10)); ChartDialog chartDialog = new ChartDialog(scatterPlot); chartDialog.setLocation(getLocation()); chartDialog.setVisible(true); }