List of usage examples for org.jfree.chart.renderer.xy XYSplineRenderer setSeriesShapesVisible
public void setSeriesShapesVisible(int series, boolean visible)
From source file:loci.slim.ui.ExcitationGraph.java
/** * Creates the chart/*ww w . j a va2 s . c o m*/ * * @param bins number of bins * @param timeInc time increment per bin * @param data fitted data * @return the chart */ JFreeChart createChart(final int bins, final double timeInc, final double[] values) { // create chart data createDataset(bins, timeInc, values); // make a horizontal axis final NumberAxis timeAxis = new NumberAxis(TIME_AXIS_LABEL); timeAxis.setLabel(UNITS_LABEL); timeAxis.setRange(0.0, (bins - 1) * timeInc); // make a vertical axis NumberAxis photonAxis; if (_logarithmic) { photonAxis = new LogarithmicAxis(PHOTON_AXIS_LABEL); } else { photonAxis = new NumberAxis(PHOTON_AXIS_LABEL); } // make an excitation plot final XYSplineRenderer excitationRenderer = new XYSplineRenderer(); excitationRenderer.setSeriesShapesVisible(0, false); excitationRenderer.setSeriesPaint(0, EXCITATION_COLOR); _excitationPlot = new XYPlot(_excitationDataset, timeAxis, photonAxis, excitationRenderer); _excitationPlot.setDomainCrosshairVisible(true); _excitationPlot.setRangeCrosshairVisible(true); // now make the top level JFreeChart final JFreeChart chart = new JFreeChart(null, JFreeChart.DEFAULT_TITLE_FONT, _excitationPlot, true); chart.removeLegend(); return chart; }
From source file:loci.slim2.process.interactive.ui.DefaultExcitationGraph.java
/** * Creates the chart//from www . j a v a 2s. com * * @param bins number of bins * @param timeInc time increment per bin * @param data fitted data * @return the chart */ JFreeChart createChart(final int bins, final double timeInc, final double[] values) { // create chart data createDataset(bins, timeInc, values); // make a horizontal axis final NumberAxis timeAxis = new NumberAxis(TIME_AXIS_LABEL); timeAxis.setLabel(UNITS_LABEL); timeAxis.setRange(0.0, (bins - 1) * timeInc); // make a vertical axis NumberAxis photonAxis; if (logarithmic) { photonAxis = new LogarithmicAxis(PHOTON_AXIS_LABEL); } else { photonAxis = new NumberAxis(PHOTON_AXIS_LABEL); } // make an excitation plot final XYSplineRenderer excitationRenderer = new XYSplineRenderer(); excitationRenderer.setSeriesShapesVisible(0, false); excitationRenderer.setSeriesPaint(0, EXCITATION_COLOR); excitationPlot = new XYPlot(excitationDataset, timeAxis, photonAxis, excitationRenderer); excitationPlot.setDomainCrosshairVisible(true); excitationPlot.setRangeCrosshairVisible(true); // now make the top level JFreeChart final JFreeChart chart = new JFreeChart(null, JFreeChart.DEFAULT_TITLE_FONT, excitationPlot, true); chart.removeLegend(); return chart; }
From source file:com.sciaps.view.PlotConfigPanel.java
private void chkShowDataPoint_ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkShowDataPoint_ActionPerformed XYSplineRenderer render = (XYSplineRenderer) plot_.getRenderer(); boolean value = chkShowDataPoint_.isSelected(); for (int i = 0; i < plot_.getSeriesCount(); i++) { render.setSeriesShapesVisible(i, value); }/*from www . j a va2s . c o m*/ }
From source file:loci.slim2.process.interactive.ui.DefaultDecayGraph.java
/** * Creates the chart//from w ww . j av a 2 s . c o m * * @param bins number of bins * @param timeInc time increment per bin * @return the chart */ JFreeChart createCombinedChart(final int bins, final double timeInc) { // create empty chart data sets decayDataset = new XYSeriesCollection(); residualDataset = new XYSeriesCollection(); // make a common horizontal axis for both sub-plots final NumberAxis timeAxis = new NumberAxis(TIME_AXIS_LABEL); timeAxis.setLabel(UNITS_LABEL); timeAxis.setRange(0.0, (bins - 1) * timeInc); // make a vertically combined plot final CombinedDomainXYPlot parent = new CombinedDomainXYPlot(timeAxis); // create decay sub-plot NumberAxis photonAxis; if (logarithmic) { photonAxis = new LogarithmicAxis(PHOTON_AXIS_LABEL); } else { photonAxis = new NumberAxis(PHOTON_AXIS_LABEL); } final XYSplineRenderer decayRenderer = new XYSplineRenderer(); decayRenderer.setSeriesShapesVisible(0, false); decayRenderer.setSeriesShapesVisible(1, false); decayRenderer.setSeriesLinesVisible(2, false); decayRenderer.setSeriesShape(2, new Ellipse2D.Float(-1.0f, -1.0f, 2.0f, 2.0f)); decayRenderer.setSeriesPaint(0, PROMPT_COLOR); decayRenderer.setSeriesPaint(1, FITTED_COLOR); decayRenderer.setSeriesPaint(2, DECAY_COLOR); decaySubPlot = new XYPlot(decayDataset, null, photonAxis, decayRenderer); decaySubPlot.setDomainCrosshairVisible(true); decaySubPlot.setRangeCrosshairVisible(true); // add decay sub-plot to parent parent.add(decaySubPlot, DECAY_WEIGHT); // create residual sub-plot final NumberAxis residualAxis = new NumberAxis(RESIDUAL_AXIS_LABEL); final XYSplineRenderer residualRenderer = new XYSplineRenderer(); residualRenderer.setSeriesPaint(0, RESIDUAL_COLOR); residualRenderer.setSeriesLinesVisible(0, false); residualRenderer.setSeriesShape(0, new Ellipse2D.Float(-1.0f, -1.0f, 2.0f, 2.0f)); final XYPlot residualSubPlot = new XYPlot(residualDataset, null, residualAxis, residualRenderer); residualSubPlot.setDomainCrosshairVisible(true); residualSubPlot.setRangeCrosshairVisible(true); residualSubPlot.setFixedLegendItems(null); // add residual sub-plot to parent parent.add(residualSubPlot, RESIDUAL_WEIGHT); // now make the top level JFreeChart final JFreeChart chart = new JFreeChart(null, JFreeChart.DEFAULT_TITLE_FONT, parent, true); chart.removeLegend(); return chart; }
From source file:loci.slim.ui.DecayGraph.java
/** * Creates the chart/* w w w.j a v a2 s . c o m*/ * * @param bins number of bins * @param timeInc time increment per bin * @return the chart */ JFreeChart createCombinedChart(final int bins, final double timeInc) { // create empty chart data sets _decayDataset = new XYSeriesCollection(); _residualDataset = new XYSeriesCollection(); // make a common horizontal axis for both sub-plots final NumberAxis timeAxis = new NumberAxis(TIME_AXIS_LABEL); timeAxis.setLabel(UNITS_LABEL); timeAxis.setRange(0.0, (bins - 1) * timeInc); // make a vertically combined plot final CombinedDomainXYPlot parent = new CombinedDomainXYPlot(timeAxis); // create decay sub-plot NumberAxis photonAxis; if (_logarithmic) { photonAxis = new LogarithmicAxis(PHOTON_AXIS_LABEL); } else { photonAxis = new NumberAxis(PHOTON_AXIS_LABEL); } final XYSplineRenderer decayRenderer = new XYSplineRenderer(); decayRenderer.setSeriesShapesVisible(0, false); decayRenderer.setSeriesShapesVisible(1, false); decayRenderer.setSeriesLinesVisible(2, false); decayRenderer.setSeriesShape(2, new Ellipse2D.Float(-1.0f, -1.0f, 2.0f, 2.0f)); decayRenderer.setSeriesPaint(0, PROMPT_COLOR); decayRenderer.setSeriesPaint(1, FITTED_COLOR); decayRenderer.setSeriesPaint(2, DECAY_COLOR); _decaySubPlot = new XYPlot(_decayDataset, null, photonAxis, decayRenderer); _decaySubPlot.setDomainCrosshairVisible(true); _decaySubPlot.setRangeCrosshairVisible(true); // add decay sub-plot to parent parent.add(_decaySubPlot, DECAY_WEIGHT); // create residual sub-plot final NumberAxis residualAxis = new NumberAxis(RESIDUAL_AXIS_LABEL); final XYSplineRenderer residualRenderer = new XYSplineRenderer(); residualRenderer.setSeriesPaint(0, RESIDUAL_COLOR); residualRenderer.setSeriesLinesVisible(0, false); residualRenderer.setSeriesShape(0, new Ellipse2D.Float(-1.0f, -1.0f, 2.0f, 2.0f)); final XYPlot residualSubPlot = new XYPlot(_residualDataset, null, residualAxis, residualRenderer); residualSubPlot.setDomainCrosshairVisible(true); residualSubPlot.setRangeCrosshairVisible(true); residualSubPlot.setFixedLegendItems(null); // add residual sub-plot to parent parent.add(residualSubPlot, RESIDUAL_WEIGHT); // now make the top level JFreeChart final JFreeChart chart = new JFreeChart(null, JFreeChart.DEFAULT_TITLE_FONT, parent, true); chart.removeLegend(); return chart; }