Example usage for org.jfree.chart.plot ContourPlot setColorBarLocation

List of usage examples for org.jfree.chart.plot ContourPlot setColorBarLocation

Introduction

In this page you can find the example usage for org.jfree.chart.plot ContourPlot setColorBarLocation.

Prototype

public void setColorBarLocation(RectangleEdge edge) 

Source Link

Document

Sets the color bar location and sends a PlotChangeEvent to all registered listeners.

Usage

From source file:de.berlios.statcvs.xml.report.ActivityProgressionChart.java

private JFreeChart createContourPlot() {
    Grouper grouper = settings.getGrouper(new ModuleGrouper(settings.getModules(content)));

    ContourDataset data = createDataset(grouper);
    if (data == null) {
        return null;
    }//from  w  w w.  j  a  v a2  s  .c  om

    ValueAxis xAxis = new DateAxis(I18n.tr("Date"));

    SymbolicAxis yAxis = new SymbolicAxis(grouper.getName(), (String[]) groupNames.toArray(new String[0]));
    yAxis.setInverted(true);
    yAxis.setLowerMargin(0.0);
    yAxis.setUpperMargin(0.0);

    ColorBar zAxis = new ColorBar(I18n.tr("Commit Activity (%)"));
    zAxis.getAxis();

    ContourPlot plot = new ContourPlot(data, xAxis, yAxis, zAxis);
    //plot.setRenderAsPoints(true);
    // don't use plot units for ratios when x axis is date
    plot.setDataAreaRatio(0.0);
    plot.setColorBarLocation(RectangleEdge.BOTTOM);

    return new JFreeChart(settings.getProjectName(), null, plot, false);
}