Java Code Examples for org.jfree.chart.plot.XYPlot#getDomainCrosshairPaint()

The following examples show how to use org.jfree.chart.plot.XYPlot#getDomainCrosshairPaint() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HistogramChartFactory.java    From mzmine3 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Adds annotations to the Gaussian fit parameters
 * 
 * @param plot
 * @param fit Gaussian fit {normalisation factor, mean, sigma}
 */
public static void addGaussianFitAnnotations(XYPlot plot, double[] fit) {
  Paint c = plot.getDomainCrosshairPaint();
  BasicStroke s = new BasicStroke(1, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1,
      new float[] {5f, 2.5f}, 0);

  plot.addDomainMarker(new ValueMarker(fit[1], c, s));
  plot.addDomainMarker(new ValueMarker(fit[1] - fit[2], c, s));
  plot.addDomainMarker(new ValueMarker(fit[1] + fit[2], c, s));
}
 
Example 2
Source File: HistogramChartFactory.java    From old-mzmine3 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Adds annotations to the Gaussian fit parameters
 * 
 * @param plot
 * @param fit Gaussian fit {normalisation factor, mean, sigma}
 */
public static void addGaussianFitAnnotations(XYPlot plot, double[] fit) {
  Paint c = plot.getDomainCrosshairPaint();
  BasicStroke s = new BasicStroke(1, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1,
      new float[] {5f, 2.5f}, 0);

  plot.addDomainMarker(new ValueMarker(fit[1], c, s));
  plot.addDomainMarker(new ValueMarker(fit[1] - fit[2], c, s));
  plot.addDomainMarker(new ValueMarker(fit[1] + fit[2], c, s));
}
 
Example 3
Source File: HistogramChartFactory.java    From mzmine2 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Adds annotations to the Gaussian fit parameters
 * 
 * @param plot
 * @param fit Gaussian fit {normalisation factor, mean, sigma}
 */
public static void addGaussianFitAnnotations(XYPlot plot, double[] fit) {
  Paint c = plot.getDomainCrosshairPaint();
  BasicStroke s = new BasicStroke(1, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1,
      new float[] {5f, 2.5f}, 0);

  plot.addDomainMarker(new ValueMarker(fit[1], c, s));
  plot.addDomainMarker(new ValueMarker(fit[1] - fit[2], c, s));
  plot.addDomainMarker(new ValueMarker(fit[1] + fit[2], c, s));
}