当前位置: 首页>>代码示例>>Java>>正文


Java PolarPlot类代码示例

本文整理汇总了Java中org.jfree.chart.plot.PolarPlot的典型用法代码示例。如果您正苦于以下问题:Java PolarPlot类的具体用法?Java PolarPlot怎么用?Java PolarPlot使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PolarPlot类属于org.jfree.chart.plot包,在下文中一共展示了PolarPlot类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createPolarChart

import org.jfree.chart.plot.PolarPlot; //导入依赖的package包/类
/**
 * Creates a polar plot for the specified dataset (x-values interpreted as 
 * angles in degrees).  The chart object returned by this method uses a 
 * {@link PolarPlot} instance as the plot, with a {@link NumberAxis} for 
 * the radial axis.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param dataset  the dataset (<code>null</code> permitted).
 * @param legend  legend required?
 * @param tooltips  tooltips required?
 * @param urls  URLs required?
 *
 * @return A chart.
 */
public static JFreeChart createPolarChart(String title,
                                          XYDataset dataset,
                                          boolean legend,
                                          boolean tooltips,
                                          boolean urls) {

    PolarPlot plot = new PolarPlot();
    plot.setDataset(dataset);
    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(
            title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);
    return chart;

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:34,代码来源:ChartFactory.java

示例2: createPolarChart

import org.jfree.chart.plot.PolarPlot; //导入依赖的package包/类
/**
 * Creates a polar plot for the specified dataset (x-values interpreted as angles in degrees).
 * <P>
 * The chart object returned by this method uses a {@link PolarPlot} instance as the
 * plot, with a {@link NumberAxis} for the radial axis.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param dataset  the dataset (<code>null</code> permitted).
 * @param legend  legend required?
 * @param tooltips  tooltips required?
 * @param urls  URLs required?
 *
 * @return A chart.
 */
public static JFreeChart createPolarChart(String title,
                                          XYDataset dataset,
                                          boolean legend,
                                          boolean tooltips,
                                          boolean urls) {

    PolarPlot plot = new PolarPlot();
    plot.setDataset(dataset);
    NumberAxis rangeAxis = new NumberAxis();
    rangeAxis.setAxisLineVisible(false);
    rangeAxis.setTickMarksVisible(false);
    rangeAxis.setTickLabelInsets(new Insets(0, 0, 0, 0));
    plot.setRadialAxis(rangeAxis);
    plot.setRenderer(new DefaultPolarItemRenderer());
    JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);
    return chart;

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:33,代码来源:ChartFactory.java

示例3: createPolarChart

import org.jfree.chart.plot.PolarPlot; //导入依赖的package包/类
/**
 * Creates a polar plot for the specified dataset (x-values interpreted as
 * angles in degrees).  The chart object returned by this method uses a
 * {@link PolarPlot} instance as the plot, with a {@link NumberAxis} for
 * the radial axis.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param dataset  the dataset (<code>null</code> permitted).
 * @param legend  legend required?
 * @param tooltips  tooltips required?
 * @param urls  URLs required?
 *
 * @return A chart.
 */
public static JFreeChart createPolarChart(String title, XYDataset dataset,
        boolean legend, boolean tooltips, boolean urls) {

    PolarPlot plot = new PolarPlot();
    plot.setDataset(dataset);
    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(
            title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);
    currentTheme.apply(chart);
    return chart;

}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:32,代码来源:ChartFactory.java

示例4: createPolarChart

import org.jfree.chart.plot.PolarPlot; //导入依赖的package包/类
/**
 * Creates a polar plot for the specified dataset (x-values interpreted as
 * angles in degrees).  The chart object returned by this method uses a
 * {@link PolarPlot} instance as the plot, with a {@link NumberAxis} for
 * the radial axis.
 *
 * @param title  the chart title ({@code null} permitted).
 * @param dataset  the dataset ({@code null} permitted).
 * @param legend  legend required?
 * @param tooltips  tooltips required?
 * @param urls  URLs required?
 *
 * @return A chart.
 */
public static JFreeChart createPolarChart(String title, XYDataset dataset,
        boolean legend, boolean tooltips, boolean urls) {

    PolarPlot plot = new PolarPlot();
    plot.setDataset(dataset);
    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(
            title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);
    currentTheme.apply(chart);
    return chart;

}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:32,代码来源:ChartFactory.java

示例5: createXYPolarChart

import org.jfree.chart.plot.PolarPlot; //导入依赖的package包/类
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;

  }
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:24,代码来源:ChartGenerator_JTable.java

示例6: getLegendItem

import org.jfree.chart.plot.PolarPlot; //导入依赖的package包/类
public LegendItem getLegendItem(int series) {
     LegendItem result = null;

     PolarPlot polarPlot = getPlot();
     if (polarPlot != null) {
         XYDataset dataset;

         dataset = polarPlot.getDataset();
s = new Summary(dataset);
         if (dataset != null) {
             //String label = dataset.getSeriesKey(series).toString();
	String label = s.getYSummary(series)+"\n";
             String description = label;
             Shape shape = lookupSeriesShape(series);
             Paint paint = lookupSeriesPaint(series);
             Paint outlinePaint = lookupSeriesOutlinePaint(series);
             Stroke outlineStroke = lookupSeriesOutlineStroke(series);
             result = new LegendItem(label, description, null, null, 
                     shape, paint, outlineStroke, outlinePaint);
             result.setDataset(dataset);
         }
     }
     return result;
 }
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:25,代码来源:SOCRPolarItemRenderer.java

示例7: createPolarChart

import org.jfree.chart.plot.PolarPlot; //导入依赖的package包/类
/**
 * Creates a polar plot for the specified dataset (x-values interpreted as
 * angles in degrees).  The chart object returned by this method uses a
 * {@link PolarPlot} instance as the plot, with a {@link NumberAxis} for
 * the radial axis.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param dataset  the dataset (<code>null</code> permitted).
 * @param legend  legend required?
 * @param tooltips  tooltips required?
 * @param urls  URLs required?
 *
 * @return A chart.
 */
public static JFreeChart createPolarChart(String title,
                                          XYDataset dataset,
                                          boolean legend,
                                          boolean tooltips,
                                          boolean urls) {

    PolarPlot plot = new PolarPlot();
    plot.setDataset(dataset);
    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(
            title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);
    currentTheme.apply(chart);
    return chart;

}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:35,代码来源:ChartFactory.java

示例8: getLegendItem

import org.jfree.chart.plot.PolarPlot; //导入依赖的package包/类
/**
 * Return the legend for the given series.
 *
 * @param series  the series index.
 *
 * @return The legend item.
 */
public LegendItem getLegendItem(int series) {
    LegendItem result = null;
    PolarPlot polarPlot = getPlot();
    if (polarPlot != null) {
        XYDataset dataset = polarPlot.getDataset();
        if (dataset != null) {
            String label = dataset.getSeriesKey(series).toString();
            String description = label;
            Shape shape = lookupSeriesShape(series);
            Paint paint = lookupSeriesPaint(series);
            Paint outlinePaint = lookupSeriesOutlinePaint(series);
            Stroke outlineStroke = lookupSeriesOutlineStroke(series);
            result = new LegendItem(label, description, null, null,
                    shape, paint, outlineStroke, outlinePaint);
            result.setDataset(dataset);
        }
    }
    return result;
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:27,代码来源:DefaultPolarItemRenderer.java

示例9: getLegendItem

import org.jfree.chart.plot.PolarPlot; //导入依赖的package包/类
/**
 * Return the legend for the given series.
 * 
 * @param series  the series index.
 * 
 * @return The legend item.
 */
public LegendItem getLegendItem(int series) {
    LegendItem result = null;
    PolarPlot polarPlot = getPlot();
    if (polarPlot != null) {
        XYDataset dataset;
        dataset = polarPlot.getDataset();
        if (dataset != null) {
            String label = dataset.getSeriesKey(series).toString();
            String description = label;
            Shape shape = getSeriesShape(series);
            Paint paint = getSeriesPaint(series);
            Paint outlinePaint = getSeriesOutlinePaint(series);
            Stroke outlineStroke = getSeriesOutlineStroke(series);
            result = new LegendItem(label, description, null, null, 
                    shape, paint, outlineStroke, outlinePaint);
        }
    }
    return result;
}
 
开发者ID:nologic,项目名称:nabs,代码行数:27,代码来源:DefaultPolarItemRenderer.java

示例10: createPolarChart

import org.jfree.chart.plot.PolarPlot; //导入依赖的package包/类
/**
 * Creates a polar plot for the specified dataset (x-values interpreted as
 * angles in degrees).  The chart object returned by this method uses a
 * {@link PolarPlot} instance as the plot, with a {@link NumberAxis} for
 * the radial axis.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param dataset  the dataset (<code>null</code> permitted).
 * @param legend  legend required?
 *
 * @return A chart.
 */
public static JFreeChart createPolarChart(String title, XYDataset dataset,
        boolean legend) {

    PolarPlot plot = new PolarPlot();
    plot.setDataset(dataset);
    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(
            title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);
    currentTheme.apply(chart);
    return chart;

}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:30,代码来源:ChartFactory.java

示例11: createPolarChart

import org.jfree.chart.plot.PolarPlot; //导入依赖的package包/类
private JFreeChart createPolarChart(final XYDataset dataset,String chartName) {
       if(chartName == null)
          chartName=FunctionToPlot;
        final JFreeChart chRt = ChartFactory.createPolarChart(
            chartName, dataset, true, true, false
        ); 
        final PolarPlot plot = (PolarPlot) chRt.getPlot();
        final DefaultPolarItemRenderer renderer = (DefaultPolarItemRenderer) plot.getRenderer();
        renderer.setShapesVisible(false);
//renderer.setShapesFilled(false);
       // renderer.setSeriesFilled(0, false);
        return chRt;
    }
 
开发者ID:mathhobbit,项目名称:EditCalculateAndChart,代码行数:14,代码来源:plrPlt.java

示例12: getDrawingSupplier

import org.jfree.chart.plot.PolarPlot; //导入依赖的package包/类
/** 
 * Returns the drawing supplier from the plot.
 *
 * @return The drawing supplier.
 */
public DrawingSupplier getDrawingSupplier() {
    DrawingSupplier result = null;
    PolarPlot p = getPlot();
    if (p != null) {
        result = p.getDrawingSupplier();
    }
    return result;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:14,代码来源:DefaultPolarItemRenderer.java

示例13: drawSeries

import org.jfree.chart.plot.PolarPlot; //导入依赖的package包/类
/**
 * Plots the data for a given series.
 * 
 * @param g2  the drawing surface.
 * @param dataArea  the data area.
 * @param info  collects plot rendering info.
 * @param plot  the plot.
 * @param dataset  the dataset.
 * @param seriesIndex  the series index.
 */
public void drawSeries(Graphics2D g2, 
                       Rectangle2D dataArea, 
                       PlotRenderingInfo info,
                       PolarPlot plot,
                       XYDataset dataset,
                       int seriesIndex) {
    
    Polygon poly = new Polygon();
    int numPoints = dataset.getItemCount(seriesIndex);
    for (int i = 0; i < numPoints; i++) {
        double theta = dataset.getXValue(seriesIndex, i);
        double radius = dataset.getYValue(seriesIndex, i);
        Point p = plot.translateValueThetaRadiusToJava2D(theta, radius, dataArea);
        poly.addPoint(p.x, p.y);
    }
    g2.setPaint(getSeriesPaint(seriesIndex));
    g2.setStroke(getSeriesStroke(seriesIndex));
    if (isSeriesFilled(seriesIndex)) {
        Composite savedComposite = g2.getComposite();
        g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f));
        g2.fill(poly);
        g2.setComposite(savedComposite);
    }
    else {
        g2.draw(poly);
    }
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:38,代码来源:DefaultPolarItemRenderer.java

示例14: drawRadialGridLines

import org.jfree.chart.plot.PolarPlot; //导入依赖的package包/类
/**
 * Draw the radial gridlines - the rings.
 * 
 * @param g2  the drawing surface.
 * @param plot  the plot.
 * @param radialAxis  the radial axis.
 * @param ticks  the ticks.
 * @param dataArea  the data area.
 */
public void drawRadialGridLines(Graphics2D g2, 
                                PolarPlot plot,
                                ValueAxis radialAxis,
                                List ticks,
                                Rectangle2D dataArea) {
    
    g2.setFont(radialAxis.getTickLabelFont());
    g2.setPaint(plot.getRadiusGridlinePaint());
    g2.setStroke(plot.getRadiusGridlineStroke());

    Point center = plot.translateValueThetaRadiusToJava2D(0.0, 0.0, dataArea);
    
    Iterator iterator = ticks.iterator();
    while (iterator.hasNext()) {
        NumberTick tick = (NumberTick) iterator.next();
        Point p = plot.translateValueThetaRadiusToJava2D(
            90.0, tick.getNumber().doubleValue(), dataArea
        );
        int r = p.x - center.x;
        int upperLeftX = center.x - r;
        int upperLeftY = center.y - r;
        int d = 2 * r;
        Ellipse2D ring = new Ellipse2D.Double(upperLeftX, upperLeftY, d, d);
        g2.setPaint(plot.getRadiusGridlinePaint());
        g2.draw(ring);
    }
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:37,代码来源:DefaultPolarItemRenderer.java

示例15: checkChart

import org.jfree.chart.plot.PolarPlot; //导入依赖的package包/类
/**
 * Test that the chart is using an xy plot with time as the domain axis.
 * 
 * @param chart  the chart.
 */
private void checkChart(JFreeChart chart) {
    Plot plot = chart.getPlot();
    if (!(plot instanceof PolarPlot)) {
        throw new IllegalArgumentException("plot is not a PolarPlot");
   }
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:12,代码来源:PolarChartPanel.java


注:本文中的org.jfree.chart.plot.PolarPlot类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。