Example usage for org.jfree.chart.plot PolarPlot setAngleGridlinesVisible

List of usage examples for org.jfree.chart.plot PolarPlot setAngleGridlinesVisible

Introduction

In this page you can find the example usage for org.jfree.chart.plot PolarPlot setAngleGridlinesVisible.

Prototype

public void setAngleGridlinesVisible(boolean visible) 

Source Link

Document

Sets the flag that controls whether or not the angular grid-lines are visible.

Usage

From source file:org.hxzon.demo.jfreechart.PolarChartDemo.java

private static JFreeChart createPolarChart(XYDataset dataset) {
    boolean legend = true;
    PolarPlot plot = new PolarPlot();
    plot.setDataset(dataset);/* www .j a  v a2 s. co  m*/
    NumberAxis rangeAxis = new NumberAxis();
    rangeAxis.setAxisLineVisible(false);
    rangeAxis.setTickMarksVisible(false);
    rangeAxis.setTickLabelInsets(new RectangleInsets(0.0, 0.0, 0.0, 0.0));
    plot.setAxis(rangeAxis);
    plot.setRenderer(new DefaultPolarItemRenderer());
    JFreeChart chart = new JFreeChart("Polar Chart Demo", JFreeChart.DEFAULT_TITLE_FONT, plot, legend);
    chart.setBackgroundPaint(Color.white);

    plot.setBackgroundPaint(Color.lightGray);

    plot.setAngleGridlinesVisible(true);
    plot.setAngleLabelsVisible(true);
    plot.setAngleTickUnit(new NumberTickUnit(5));

    return chart;
}

From source file:org.hxzon.demo.jfreechart.OtherDatasetDemo.java

private static JFreeChart createPolarChart(XYDataset dataset) {

    PolarPlot plot = new PolarPlot();
    plot.setDataset(dataset);/*ww  w. ja va 2 s. c o m*/
    NumberAxis rangeAxis = new NumberAxis();
    rangeAxis.setAxisLineVisible(false);
    rangeAxis.setTickMarksVisible(false);
    rangeAxis.setTickLabelInsets(new RectangleInsets(0.0, 0.0, 0.0, 0.0));
    plot.setAxis(rangeAxis);
    plot.setRenderer(new DefaultPolarItemRenderer());
    JFreeChart chart = new JFreeChart("Polar Chart Demo", JFreeChart.DEFAULT_TITLE_FONT, plot, legend);
    chart.setBackgroundPaint(Color.white);

    plot.setBackgroundPaint(Color.lightGray);

    plot.setAngleGridlinesVisible(true);
    plot.setAngleLabelsVisible(true);
    plot.setAngleTickUnit(new NumberTickUnit(5));

    return chart;
}