List of usage examples for org.jfree.chart.plot PolarPlot setAngleGridlinesVisible
public void setAngleGridlinesVisible(boolean visible)
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; }