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

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

Introduction

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

Prototype

public void setBackgroundImage(Image image) 

Source Link

Document

Sets the background image for the plot and sends a PlotChangeEvent to all registered listeners.

Usage

From source file:org.openmicroscopy.shoola.util.ui.graphutils.LinePlot.java

/** 
 * Creates the chart./*from w w w  . ja  v a  2s. c  o  m*/
 * @see ChartObject#createChar()
 */
void createChart() {
    for (int i = 0; i < colours.size(); i++)
        renderer.setSeriesPaint(i, colours.get(i));
    XYPlot plot = new XYPlot(dataset, domainAxis, rangeAxis, renderer);
    if (backgroundImage != null) {
        plot.setRangeGridlinesVisible(false);
        plot.setDomainGridlinesVisible(false);
        plot.setBackgroundImage(backgroundImage);
    }

    chart = new JFreeChart(title, plot);
}