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


Java CategoryPlot.setRangeGridlinePaint方法代码示例

本文整理汇总了Java中org.jfree.chart.plot.CategoryPlot.setRangeGridlinePaint方法的典型用法代码示例。如果您正苦于以下问题:Java CategoryPlot.setRangeGridlinePaint方法的具体用法?Java CategoryPlot.setRangeGridlinePaint怎么用?Java CategoryPlot.setRangeGridlinePaint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jfree.chart.plot.CategoryPlot的用法示例。


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

示例1: visualizarSerieChartAsignRescateVict

import org.jfree.chart.plot.CategoryPlot; //导入方法依赖的package包/类
public void  visualizarSerieChartAsignRescateVict(Color color,CategoryDataset dataset) {
     ChartPanel chartPanel = new ChartPanel(chartNotifAsigResc);
     chartNotifAsigResc.setBackgroundPaint(Color.white);
    CategoryPlot plot = (CategoryPlot) chartNotifAsigResc.getPlot();
     plot.setBackgroundPaint(color);
     plot.setDataset(dataset);
     plot.setDomainGridlinePaint(Color.white);
     plot.setRangeGridlinePaint(Color.white);
     NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
     rangeAxis.setUpperMargin(0.15);
     CategoryItemRenderer renderer = plot.getRenderer();
     renderer.setItemLabelGenerator(new LabelGenerator(50.0));
     renderer.setItemLabelFont(new Font("Serif", Font.PLAIN, 8));
     renderer.setItemLabelsVisible(true);
     chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
   setContentPane(chartPanel);
   this.pack();
   RefineryUtilities.centerFrameOnScreen(this);
   this.setVisible(true);
}
 
开发者ID:Yarichi,项目名称:Proyecto-DASI,代码行数:21,代码来源:VisualizacionJfreechart.java

示例2: visualizarSeriesTiemposRescateVictPorRobots

import org.jfree.chart.plot.CategoryPlot; //导入方法依赖的package包/类
public void  visualizarSeriesTiemposRescateVictPorRobots(CategoryDataset dataset) {
    JFreeChart chart = ChartFactory.createBarChart(
     "Tiempos de Rescate de Victimas por cada robot ", // chart title
     "Robots en el entorno", // domain axis label
     "Tiempo milisegundos", // range axis label
     dataset, // data
     PlotOrientation.VERTICAL, // orientation
     true, // include legend
     true, // tooltips?
     false // URLs?
     );
     ChartPanel chartPanel = new ChartPanel(chart);
     chart.setBackgroundPaint(Color.white);
     CategoryPlot plot = chart.getCategoryPlot();
     plot.setBackgroundPaint(Color.lightGray);
     plot.setDomainGridlinePaint(Color.white);
     plot.setRangeGridlinePaint(Color.white);
     NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
     rangeAxis.setUpperMargin(0.15);
     CategoryItemRenderer renderer = plot.getRenderer();
     renderer.setItemLabelGenerator(new LabelGenerator(50.0));
     renderer.setItemLabelFont(new Font("Serif", Font.PLAIN, 8));
     renderer.setItemLabelsVisible(true);
     chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
     this.visualizar(chartPanel);
}
 
开发者ID:Yarichi,项目名称:Proyecto-DASI,代码行数:27,代码来源:VisualizacionJfreechart.java

示例3: visualizarSeriesEnergRescateVictPorRobots

import org.jfree.chart.plot.CategoryPlot; //导入方法依赖的package包/类
public void  visualizarSeriesEnergRescateVictPorRobots(CategoryDataset dataset) {
    JFreeChart chart = ChartFactory.createBarChart(
     "Tiempos de Rescate de Victimas por cada robot ", // chart title
     "Robots en el entorno", // domain axis label
     "Unidades de energ�a", // range axis label
     dataset, // data
     PlotOrientation.VERTICAL, // orientation
     true, // include legend
     true, // tooltips?
     false // URLs?
     );
     ChartPanel chartPanel = new ChartPanel(chart);
     chart.setBackgroundPaint(Color.white);
     CategoryPlot plot = chart.getCategoryPlot();
     plot.setBackgroundPaint(Color.lightGray);
     plot.setDomainGridlinePaint(Color.white);
     plot.setRangeGridlinePaint(Color.white);
     NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
     rangeAxis.setUpperMargin(0.15);
     CategoryItemRenderer renderer = plot.getRenderer();
     renderer.setItemLabelGenerator(new LabelGenerator(50.0));
     renderer.setItemLabelFont(new Font("Serif", Font.PLAIN, 8));
     renderer.setItemLabelsVisible(true);
     chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
     this.visualizar(chartPanel);
}
 
开发者ID:Yarichi,项目名称:Proyecto-DASI,代码行数:27,代码来源:VisualizacionJfreechart.java

示例4: setYAixs

import org.jfree.chart.plot.CategoryPlot; //导入方法依赖的package包/类
public static void setYAixs(CategoryPlot plot) {
    Color lineColor = new Color(192, 208, 224);
    ValueAxis axis = plot.getRangeAxis();
    axis.setAxisLinePaint(lineColor);
    axis.setTickMarkPaint(lineColor);
    axis.setAxisLineVisible(false);
    axis.setTickMarksVisible(false);
    plot.setRangeGridlinePaint(new Color(192, 192, 192));
    plot.setRangeGridlineStroke(new BasicStroke(1));

    plot.getRangeAxis().setUpperMargin(0.1);
    plot.getRangeAxis().setLowerMargin(0.1);

}
 
开发者ID:Fanping,项目名称:iveely.ml,代码行数:15,代码来源:ChartUtils.java

示例5: createChart

import org.jfree.chart.plot.CategoryPlot; //导入方法依赖的package包/类
private JFreeChart createChart(CategoryDataset dataset, HttpServletRequest request) {
    JFreeChart chart = ChartFactory.createBarChart(null, null, null, dataset, PlotOrientation.HORIZONTAL, false, false, false);

    CategoryPlot plot = chart.getCategoryPlot();
    Paint background = new GradientPaint(0, 0, Color.lightGray, 0, IMAGE_MIN_HEIGHT, Color.white);
    plot.setBackgroundPaint(background);
    plot.setDomainGridlinePaint(Color.white);
    plot.setDomainGridlinesVisible(true);
    plot.setRangeGridlinePaint(Color.white);
    plot.setRangeAxisLocation(AxisLocation.BOTTOM_OR_LEFT);

    LogarithmicAxis rangeAxis = new LogarithmicAxis(null);
    rangeAxis.setStrictValuesFlag(false);
    rangeAxis.setAllowNegativesFlag(true);
    plot.setRangeAxis(rangeAxis);

    // Disable bar outlines.
    BarRenderer renderer = (BarRenderer) plot.getRenderer();
    renderer.setDrawBarOutline(false);

    // Set up gradient paint for series.
    GradientPaint gp0 = new GradientPaint(
            0.0f, 0.0f, Color.blue,
            0.0f, 0.0f, new Color(0, 0, 64)
    );
    renderer.setSeriesPaint(0, gp0);

    // Rotate labels.
    CategoryAxis domainAxis = plot.getDomainAxis();
    domainAxis.setCategoryLabelPositions(CategoryLabelPositions.createUpRotationLabelPositions(Math.PI / 6.0));

    // Set theme-specific colors.
    Color bgColor = getBackground(request);
    Color fgColor = getForeground(request);

    chart.setBackgroundPaint(bgColor);

    domainAxis.setTickLabelPaint(fgColor);
    domainAxis.setTickMarkPaint(fgColor);
    domainAxis.setAxisLinePaint(fgColor);

    rangeAxis.setTickLabelPaint(fgColor);
    rangeAxis.setTickMarkPaint(fgColor);
    rangeAxis.setAxisLinePaint(fgColor);

    return chart;
}
 
开发者ID:airsonic,项目名称:airsonic,代码行数:48,代码来源:UserChartController.java

示例6: crearBarChartCosteEnergiaRescateVictimas

import org.jfree.chart.plot.CategoryPlot; //导入方法依赖的package包/类
public void crearBarChartCosteEnergiaRescateVictimas(CategoryDataset dataset) {
         JFreeChart chart = ChartFactory.createBarChart(
        "Energ�a consumida para salvar las victimas ", // chart title
        "Victimas ordenadas por tiempo de rescate", // domain axis label
        "Energ�a consumida", // range axis label
        dataset, // data
        PlotOrientation.VERTICAL, // orientation
        true, // include legend
        true, // tooltips?
        false // URLs?
        );
        ChartPanel chartPanel = new ChartPanel(chart);
        chart.setBackgroundPaint(Color.white);
        CategoryPlot plot = chart.getCategoryPlot();
        plot.setBackgroundPaint(Color.lightGray);
        plot.setDomainGridlinePaint(Color.white);
        plot.setRangeGridlinePaint(Color.white);
        NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
        rangeAxis.setUpperMargin(0.15);
        CategoryItemRenderer renderer = plot.getRenderer();
        renderer.setItemLabelGenerator(new LabelGenerator(50.0));
        renderer.setItemLabelFont(new Font("Serif", Font.PLAIN, 8));
        renderer.setItemLabelsVisible(true);
        chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
      setContentPane(chartPanel);
      this.pack();
      RefineryUtilities.centerFrameOnScreen(this);
      this.setVisible(true);
//        return chart;
            }
 
开发者ID:Yarichi,项目名称:Proyecto-DASI,代码行数:31,代码来源:VisualizacionJfreechart.java

示例7: crearChartAsignRescateVict

import org.jfree.chart.plot.CategoryPlot; //导入方法依赖的package包/类
public  JFreeChart crearChartAsignRescateVict(CategoryDataset dataset) {
       
       chartNotifAsigResc = ChartFactory.createLineChart(
          "Tiempos de Rescate de Victimas ",      // chart title Titulo local del grafico
          "Victimas Rescatadas  en Entorno",                      // x axis label
          "Tiempo milisegundos",                      // y axis label
          dataset,                  // data
          PlotOrientation.VERTICAL,
          true,                     // include legend
          true,                     // tooltips
          false                     // urls
      );

      // NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...
      ChartPanel chartPanel = new ChartPanel(chartNotifAsigResc,false);
        chartNotifAsigResc.setBackgroundPaint(Color.white);
//       CategoryPlot plot = (CategoryPlot) chartNotifAsigResc.getPlot();
        CategoryPlot plot = chartNotifAsigResc.getCategoryPlot();
        plot.setBackgroundPaint(Color.lightGray);
        plot.setDomainGridlinePaint(Color.white);
        plot.setRangeGridlinePaint(Color.white);
        NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
        rangeAxis.setUpperMargin(0.15);
        CategoryItemRenderer renderer = plot.getRenderer();
        renderer.setItemLabelGenerator(new LabelGenerator(50.0));
        renderer.setItemLabelFont(new Font("Serif", Font.PLAIN, 8));
        renderer.setItemLabelsVisible(true);
        chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
      setContentPane(chartPanel);
      this.pack();
      RefineryUtilities.centerFrameOnScreen(this);
      this.setVisible(true);
      return chartNotifAsigResc;
    }
 
开发者ID:Yarichi,项目名称:Proyecto-DASI,代码行数:35,代码来源:VisualizacionJfreechart.java

示例8: createChart

import org.jfree.chart.plot.CategoryPlot; //导入方法依赖的package包/类
/**
 * Creates a sample chart.
 * 
 * @param dataset  the dataset.
 * 
 * @return The chart.
 */
private static JFreeChart createChart(CategoryDataset dataset) {
    
    // create the chart...
    JFreeChart chart = ChartFactory.createBarChart(
        "Bar Chart Demo",         // chart title
        "Category",               // domain axis label
        "Value",                  // range axis label
        dataset,                  // data
        PlotOrientation.VERTICAL, // orientation
        true,                     // include legend
        true,                     // tooltips?
        false                     // URLs?
    );

    // NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...

    // set the background color for the chart...
    chart.setBackgroundPaint(Color.white);

    // get a reference to the plot for further customisation...
    CategoryPlot plot = (CategoryPlot) chart.getPlot();
    plot.setBackgroundPaint(Color.lightGray);
    plot.setDomainGridlinePaint(Color.white);
    plot.setDomainGridlinesVisible(true);
    plot.setRangeGridlinePaint(Color.white);

    // set the range axis to display integers only...
    final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
    rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());

    // disable bar outlines...
    BarRenderer renderer = (BarRenderer) plot.getRenderer();
    renderer.setDrawBarOutline(false);

    CategoryAxis domainAxis = plot.getDomainAxis();
    domainAxis.setCategoryLabelPositions(
        CategoryLabelPositions.createUpRotationLabelPositions(Math.PI / 6.0)
    );
    // OPTIONAL CUSTOMISATION COMPLETED.
    
    return chart;
    
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:51,代码来源:SWTBarChartDemo1.java

示例9: createChart

import org.jfree.chart.plot.CategoryPlot; //导入方法依赖的package包/类
/**
 * Creates a sample chart.
 * 
 * @param dataset  the dataset.
 * 
 * @return The chart.
 */
private static JFreeChart createChart(CategoryDataset dataset) {
    
    // create the chart...
    JFreeChart chart = ChartFactory.createBarChart(
        "Bar Chart Demo 1",       // chart title
        "Category",               // domain axis label
        "Value",                  // range axis label
        dataset,                  // data
        PlotOrientation.VERTICAL, // orientation
        true,                     // include legend
        true,                     // tooltips?
        false                     // URLs?
    );

    // NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...

    // set the background color for the chart...
    chart.setBackgroundPaint(Color.white);

    // get a reference to the plot for further customisation...
    CategoryPlot plot = (CategoryPlot) chart.getPlot();
    plot.setBackgroundPaint(Color.lightGray);
    plot.setDomainGridlinePaint(Color.white);
    plot.setDomainGridlinesVisible(true);
    plot.setRangeGridlinePaint(Color.white);

    // ******************************************************************
    //  More than 150 demo applications are included with the JFreeChart
    //  Developer Guide...for more information, see:
    //
    //  >   http://www.object-refinery.com/jfreechart/guide.html
    //
    // ******************************************************************
    
    // set the range axis to display integers only...
    final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
    rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());

    // disable bar outlines...
    BarRenderer renderer = (BarRenderer) plot.getRenderer();
    renderer.setDrawBarOutline(false);
    
    // set up gradient paints for series...
    GradientPaint gp0 = new GradientPaint(0.0f, 0.0f, Color.blue, 
            0.0f, 0.0f, new Color(0, 0, 64));
    GradientPaint gp1 = new GradientPaint(0.0f, 0.0f, Color.green, 
            0.0f, 0.0f, new Color(0, 64, 0));
    GradientPaint gp2 = new GradientPaint(0.0f, 0.0f, Color.red, 
            0.0f, 0.0f, new Color(64, 0, 0));
    renderer.setSeriesPaint(0, gp0);
    renderer.setSeriesPaint(1, gp1);
    renderer.setSeriesPaint(2, gp2);

    CategoryAxis domainAxis = plot.getDomainAxis();
    domainAxis.setCategoryLabelPositions(
            CategoryLabelPositions.createUpRotationLabelPositions(
                    Math.PI / 6.0));
    // OPTIONAL CUSTOMISATION COMPLETED.
    
    return chart;
    
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:70,代码来源:BarChartDemo1.java

示例10: createChart

import org.jfree.chart.plot.CategoryPlot; //导入方法依赖的package包/类
/**
 * Creates a sample chart.
 * @param dataset  the dataset.
 * @return The chart.
 */
private JFreeChart createChart(CategoryDataset dataset) {
    // create the chart...
    JFreeChart chart = ChartFactory.createBarChart(
        "jaffa.sf.net 2005 Statistics",// chart title
        "Month",                  // domain axis label
        "Hits",                  // range axis label
        dataset,                  // data
        PlotOrientation.VERTICAL, // orientation
        true,                     // include legend
        true,                     // tooltips?
        false                     // URLs?
    );
 
    // NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...
 
    // set the background color for the chart...
    chart.setBackgroundPaint(Color.white);
 
    // get a reference to the plot for further customisation...
    CategoryPlot plot = chart.getCategoryPlot();
    plot.setBackgroundPaint(Color.lightGray);
    plot.setDomainGridlinePaint(Color.white);
    plot.setDomainGridlinesVisible(true);
    plot.setRangeGridlinePaint(Color.white);
 
    // set the range axis to display integers only...
    final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
    rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
 
    // disable bar outlines...
    BarRenderer renderer = (BarRenderer) plot.getRenderer();
    renderer.setDrawBarOutline(false);
 
    // set up gradient paints for series...
    GradientPaint gp0 = new GradientPaint(
        0.0f, 0.0f, Color.blue,
        0.0f, 0.0f, new Color(0, 0, 64)
    );
    GradientPaint gp1 = new GradientPaint(
        0.0f, 0.0f, Color.green,
        0.0f, 0.0f, new Color(0, 64, 0)
    );
    GradientPaint gp2 = new GradientPaint(
        0.0f, 0.0f, Color.red,
        0.0f, 0.0f, new Color(64, 0, 0)
    );
    renderer.setSeriesPaint(0, gp0);
    renderer.setSeriesPaint(1, gp1);
    renderer.setSeriesPaint(2, gp2);
 
    CategoryAxis domainAxis = plot.getDomainAxis();
    domainAxis.setCategoryLabelPositions(
        CategoryLabelPositions.createUpRotationLabelPositions(Math.PI / 6.0)
    );
    // OPTIONAL CUSTOMISATION COMPLETED.
 
    return chart;
}
 
开发者ID:jaffa-projects,项目名称:jaffa-framework,代码行数:64,代码来源:ImageDom.java


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