Example usage for org.jfree.chart.plot XYPlot getDomainCrosshairPaint

List of usage examples for org.jfree.chart.plot XYPlot getDomainCrosshairPaint

Introduction

In this page you can find the example usage for org.jfree.chart.plot XYPlot getDomainCrosshairPaint.

Prototype

public Paint getDomainCrosshairPaint() 

Source Link

Document

Returns the domain crosshair paint.

Usage

From source file:net.sf.mzmine.chartbasics.HistogramChartFactory.java

/**
 * Adds annotations to the Gaussian fit parameters
 * /*www.j  a  v a  2  s  . co m*/
 * @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));
}