List of usage examples for org.jfree.chart.plot PolarPlot setBackgroundPaint
public void setBackgroundPaint(Paint paint)
From source file:org.jfree.chart.demo.PolarChartDemo1.java
private static JFreeChart createChart(XYDataset xydataset) { JFreeChart jfreechart = ChartFactory.createPolarChart("Polar Chart Demo 1", xydataset, true, false, false); jfreechart.setBackgroundPaint(Color.white); PolarPlot polarplot = (PolarPlot) jfreechart.getPlot(); polarplot.setBackgroundPaint(Color.lightGray); polarplot.addCornerTextItem("Corner Item 1"); polarplot.addCornerTextItem("Corner Item 2"); polarplot.setAngleGridlinePaint(Color.white); polarplot.setRadiusGridlinePaint(Color.white); NumberAxis numberaxis = (NumberAxis) polarplot.getAxis(); numberaxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); return jfreechart; }
From source file:org.hxzon.demo.jfreechart.XYDatasetDemo.java
private static JFreeChart createPolarChart(XYDataset dataset) { JFreeChart chart = ChartFactory.createPolarChart("Legal & General Unit Trust Prices", // chart title dataset, // data true, // include legend true, // tooltips? false // URLs? );//w w w . java 2 s . c om chart.setBackgroundPaint(Color.white); PolarPlot plot = (PolarPlot) chart.getPlot(); plot.setBackgroundPaint(Color.lightGray); return chart; }
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);/*from w ww.j ava 2s.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; }
From source file:org.hxzon.demo.jfreechart.XYDatasetDemo2.java
private static JFreeChart createPolarChart(XYDataset dataset) { PolarPlot plot = new PolarPlot(); plot.setDataset(dataset);//from w ww .ja v a 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); return chart; }
From source file:org.hxzon.demo.jfreechart.OtherDatasetDemo.java
private static JFreeChart createPolarChart(XYDataset dataset) { PolarPlot plot = new PolarPlot(); plot.setDataset(dataset);/*from ww w . j av a 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; }
From source file:it.alus.GPSreceiver.instruments.SatelliteRadar.java
public SatelliteRadar() { super(null);//w w w . ja v a 2s . co m azimuth = new int[MAX_SAT]; elevation = new int[MAX_SAT]; snr = new int[MAX_SAT]; resetArray(); satSeries = new XYSeries("Satellites"); XYSeriesCollection seriescollection = new XYSeriesCollection(); seriescollection.addSeries(satSeries); jChart = ChartFactory.createPolarChart("Satellites", seriescollection, true, false, false); jChart.setBackgroundPaint(Color.white); PolarPlot polarplot = (PolarPlot) jChart.getPlot(); polarplot.setBackgroundPaint(Color.lightGray); polarplot.setAngleGridlinePaint(Color.white); polarplot.setRadiusGridlinePaint(Color.white); NumberAxis numberaxis = (NumberAxis) polarplot.getAxis(); numberaxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); super.setChart(jChart); super.setMouseZoomable(false); super.setPreferredSize(new Dimension(500, 270)); }
From source file:edu.ucla.stat.SOCR.chart.demo.PolarChartDemo1.java
/** * Creates a sample chart.//ww w. ja v a2 s . c o m * * @param dataset the dataset. * * @return The chart. */ protected JFreeChart createChart(XYDataset dataset) { // create the chart... JFreeChart chart = ChartFactory.createPolarChart(chartTitle, dataset, true, false, false); chart.setBackgroundPaint(Color.white); // get a reference to the plot for further customisation... PolarPlot plot = (PolarPlot) chart.getPlot(); plot.setBackgroundPaint(Color.lightGray); if (isDemo) { plot.addCornerTextItem("Corner Item 1"); plot.addCornerTextItem("Corner Item 2"); } plot.setRenderer(new SOCRPolarItemRenderer()); //PolarItemRenderer renderer = plot.getRenderer(); //renderer.setLegendItemLabelGenerator(new SOCRXYSeriesLabelGenerator()); // set the range axis to display integers only... NumberAxis rangeAxis = (NumberAxis) plot.getAxis(); rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); setXSummary(dataset); if (legendPanelOn) chart.removeLegend(); return chart; }
From source file:edu.ucla.stat.SOCR.chart.ChartGenerator_JTable.java
private JFreeChart createXYPolarChart(String title, XYDataset dataset) { // create the chart... JFreeChart chart = ChartFactory.createPolarChart(title, dataset, true, false, false); chart.setBackgroundPaint(Color.white); // get a reference to the plot for further customisation... PolarPlot plot = (PolarPlot) chart.getPlot(); plot.setBackgroundPaint(Color.lightGray); plot.setRenderer(new SOCRPolarItemRenderer()); //PolarItemRenderer renderer = plot.getRenderer(); //renderer.setLegendItemLabelGenerator(new SOCRXYSeriesLabelGenerator()); // set the range axis to display integers only... NumberAxis rangeAxis = (NumberAxis) plot.getAxis(); rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); return chart; }