當前位置: 首頁>>代碼示例>>Java>>正文


Java XYPlot.setDomainGridlinePaint方法代碼示例

本文整理匯總了Java中org.jfree.chart.plot.XYPlot.setDomainGridlinePaint方法的典型用法代碼示例。如果您正苦於以下問題:Java XYPlot.setDomainGridlinePaint方法的具體用法?Java XYPlot.setDomainGridlinePaint怎麽用?Java XYPlot.setDomainGridlinePaint使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.jfree.chart.plot.XYPlot的用法示例。


在下文中一共展示了XYPlot.setDomainGridlinePaint方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createChart

import org.jfree.chart.plot.XYPlot; //導入方法依賴的package包/類
private JFreeChart createChart(final XYDataset dataset) {
	final JFreeChart chart = ChartFactory.createXYLineChart(
			"MONA KEY SIGNATURE GRAPH", "KeySignature per users ",
			"KeyGenerating time for task(secs) ", dataset,
			PlotOrientation.VERTICAL, true, true, false);
	chart.setBackgroundPaint(Color.white);
	final XYPlot plot1 = chart.getXYPlot();
	plot1.setBackgroundPaint(Color.lightGray);
	plot1.setDomainGridlinePaint(Color.white);
	plot1.setRangeGridlinePaint(Color.white);

	final XYPlot plot2 = chart.getXYPlot();
	plot2.setBackgroundPaint(Color.lightGray);
	plot2.setDomainGridlinePaint(Color.white);
	plot2.setRangeGridlinePaint(Color.white);

	final XYPlot plot3 = chart.getXYPlot();
	plot3.setBackgroundPaint(Color.lightGray);
	plot3.setDomainGridlinePaint(Color.white);
	plot3.setRangeGridlinePaint(Color.white);

	return chart;
}
 
開發者ID:cyberheartmi9,項目名稱:Mona-Secure-Multi-Owner-Data-Sharing-for-Dynamic-Group-in-the-Cloud,代碼行數:24,代碼來源:KeySignatureGraph.java

示例2: createChart

import org.jfree.chart.plot.XYPlot; //導入方法依賴的package包/類
private JFreeChart createChart(final XYDataset dataset) {
	final JFreeChart chart = ChartFactory.createXYLineChart(
			"MONA STORAGE GRAPH", "KeyGeneration per users ",
			"KeyGenerating size in Bytes", dataset,
			PlotOrientation.VERTICAL, true, true, false);
	chart.setBackgroundPaint(Color.white);
	final XYPlot plot1 = chart.getXYPlot();
	plot1.setBackgroundPaint(Color.lightGray);
	plot1.setDomainGridlinePaint(Color.white);
	plot1.setRangeGridlinePaint(Color.white);

	final XYPlot plot2 = chart.getXYPlot();
	plot2.setBackgroundPaint(Color.lightGray);
	plot2.setDomainGridlinePaint(Color.white);
	plot2.setRangeGridlinePaint(Color.white);

	final XYPlot plot3 = chart.getXYPlot();
	plot3.setBackgroundPaint(Color.lightGray);
	plot3.setDomainGridlinePaint(Color.white);
	plot3.setRangeGridlinePaint(Color.white);

	return chart;
}
 
開發者ID:cyberheartmi9,項目名稱:Mona-Secure-Multi-Owner-Data-Sharing-for-Dynamic-Group-in-the-Cloud,代碼行數:24,代碼來源:KeyStorageGraph.java

示例3: createChart

import org.jfree.chart.plot.XYPlot; //導入方法依賴的package包/類
private JFreeChart createChart(final XYDataset dataset) {
	final JFreeChart chart = ChartFactory.createXYLineChart("Auditing",
			"Fraction of Invalid Responses ", "Auding time for task(ms)",
			dataset, PlotOrientation.VERTICAL, true, true, false);
	chart.setBackgroundPaint(Color.white);
	final XYPlot plot1 = chart.getXYPlot();
	plot1.setBackgroundPaint(Color.lightGray);
	plot1.setDomainGridlinePaint(Color.white);
	plot1.setRangeGridlinePaint(Color.white);

	final XYPlot plot2 = chart.getXYPlot();
	plot2.setBackgroundPaint(Color.lightGray);
	plot2.setDomainGridlinePaint(Color.white);
	plot2.setRangeGridlinePaint(Color.white);

	final XYPlot plot3 = chart.getXYPlot();
	plot3.setBackgroundPaint(Color.lightGray);
	plot3.setDomainGridlinePaint(Color.white);
	plot3.setRangeGridlinePaint(Color.white);

	return chart;
}
 
開發者ID:cyberheartmi9,項目名稱:Mona-Secure-Multi-Owner-Data-Sharing-for-Dynamic-Group-in-the-Cloud,代碼行數:23,代碼來源:MultiLineChart.java

示例4: createChart

import org.jfree.chart.plot.XYPlot; //導入方法依賴的package包/類
private JFreeChart createChart(final XYDataset dataset) {
	final JFreeChart chart = ChartFactory.createXYLineChart(
			"MONA TIME AND COST GRAPH", "KeyGeneration Cost ",
			"KeyGenerating time for task(secs)", dataset,
			PlotOrientation.VERTICAL, true, true, false);
	chart.setBackgroundPaint(Color.white);
	final XYPlot plot1 = chart.getXYPlot();
	plot1.setBackgroundPaint(Color.lightGray);
	plot1.setDomainGridlinePaint(Color.white);
	plot1.setRangeGridlinePaint(Color.white);

	final XYPlot plot2 = chart.getXYPlot();
	plot2.setBackgroundPaint(Color.lightGray);
	plot2.setDomainGridlinePaint(Color.white);
	plot2.setRangeGridlinePaint(Color.white);

	final XYPlot plot3 = chart.getXYPlot();
	plot3.setBackgroundPaint(Color.lightGray);
	plot3.setDomainGridlinePaint(Color.white);
	plot3.setRangeGridlinePaint(Color.white);

	return chart;
}
 
開發者ID:cyberheartmi9,項目名稱:Mona-Secure-Multi-Owner-Data-Sharing-for-Dynamic-Group-in-the-Cloud,代碼行數:24,代碼來源:TimeandCostGraph.java

示例5: createChart

import org.jfree.chart.plot.XYPlot; //導入方法依賴的package包/類
private static JFreeChart createChart(XYDataset dataset, String chartName) {
// create the chart...

if(chartName == null)
 chartName = FunctionToPlot;

JFreeChart chart = ChartFactory.createXYLineChart(
chartName,
Var,
Value,
dataset,
PlotOrientation.VERTICAL,
true,
true, 
false
);
chart.setBackgroundPaint(Color.white);

 XYPlot plot = (XYPlot) chart.getPlot();
 plot.setBackgroundPaint(Color.lightGray);
 plot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0));
 plot.setDomainGridlinePaint(Color.white);
 plot.setRangeGridlinePaint(Color.white);
XYLineAndShapeRenderer renderer
= (XYLineAndShapeRenderer) plot.getRenderer();
//renderer.setShapesVisible(true);
//renderer.setShapesFilled(true);
// change the auto tick unit selection to integer units only...
 NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
rangeAxis.setLabelAngle(Math.PI/2.0);
 rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); // OPTIONAL CUSTOMISATION COMPLETED.
return chart;
 }
 
開發者ID:mathhobbit,項目名稱:EditCalculateAndChart,代碼行數:34,代碼來源:grPlt.java

示例6: createChart

import org.jfree.chart.plot.XYPlot; //導入方法依賴的package包/類
/**
 * Creates a chart.
 *
 * @param dataset  a dataset.
 *
 * @return A chart.
 */
private static JFreeChart createChart(XYDataset dataset) {

    JFreeChart chart = ChartFactory.createTimeSeriesChart(
        "Legal & General Unit Trust Prices",  // title
        "Date",             // x-axis label
        "Price Per Unit",   // y-axis label
        dataset,            // data
        true,               // create legend?
        true,               // generate tooltips?
        false               // generate URLs?
    );

    chart.setBackgroundPaint(Color.white);

    XYPlot plot = (XYPlot) chart.getPlot();
    plot.setBackgroundPaint(Color.lightGray);
    plot.setDomainGridlinePaint(Color.white);
    plot.setRangeGridlinePaint(Color.white);
    plot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0));
    plot.setDomainCrosshairVisible(true);
    plot.setRangeCrosshairVisible(true);

    XYItemRenderer r = plot.getRenderer();
    if (r instanceof XYLineAndShapeRenderer) {
        XYLineAndShapeRenderer renderer = (XYLineAndShapeRenderer) r;
        renderer.setBaseShapesVisible(true);
        renderer.setBaseShapesFilled(true);
        renderer.setDrawSeriesLineAsPath(true);
    }

    DateAxis axis = (DateAxis) plot.getDomainAxis();
    axis.setDateFormatOverride(new SimpleDateFormat("MMM-yyyy"));

    return chart;

}
 
開發者ID:Yarichi,項目名稱:Proyecto-DASI,代碼行數:44,代碼來源:TimeSeriesChartDemo1.java

示例7: crearChartNotifAsigResc

import org.jfree.chart.plot.XYPlot; //導入方法依賴的package包/類
public void crearChartNotifAsigResc(){
    chartNotifAsigResc = ChartFactory.createXYLineChart(
      "Peticion,Asignacion y Rescate por el equipo",      // chart title Titulo local del grafico
      "Victimas en Entorno",                      // x axis label
      "Tiempo milisegundos",                      // y axis label
      null,                  // data
      PlotOrientation.VERTICAL,
      true,                     // include legend
      true,                     // tooltips
      false                     // urls
  );

  // NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...
  chartNotifAsigResc.setBackgroundPaint(Color.white);   //El fondo exterior del grafico sera blanco
  //      chart1.setBackgroundPaint(Color.green);

  // get a reference to the plot for further customisation...
 XYPlot plot = chartNotifAsigResc.getXYPlot();
  plot.setBackgroundPaint(Color.lightGray); //El fondo interior del grafico sera gris
  //plot.setBackgroundPaint(Color.blue);

  plot.setDomainGridlinePaint(Color.white);  //Las lineas verticales de la cuadricula se pinta de color blanco
  plot.setRangeGridlinePaint(Color.white);  //Las lineas horizontales de la cuadricula se pintan de color blanco
  
      
  ChartPanel chartPanel = new ChartPanel(chartNotifAsigResc);
  chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
  setContentPane(chartPanel);
  this.pack();
  RefineryUtilities.centerFrameOnScreen(this);
  this.setVisible(true);
}
 
開發者ID:Yarichi,項目名稱:Proyecto-DASI,代碼行數:33,代碼來源:VisualizacionJfreechart.java

示例8: crearChartTiemposRescatePorRobot

import org.jfree.chart.plot.XYPlot; //導入方法依賴的package包/類
public void crearChartTiemposRescatePorRobot(){
    chartTiemposRescatePorRobot = ChartFactory.createXYLineChart(
      "Tiempos de Rescate por Robot ",      // chart title Titulo local del grafico
      "Robots en Entorno",                      // x axis label
      "Tiempo milisegundos",                      // y axis label
      null,                  // data
      PlotOrientation.VERTICAL,
      true,                     // include legend
      true,                     // tooltips
      false                     // urls
  );
    // NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...
  chartTiemposRescatePorRobot.setBackgroundPaint(Color.white);   //El fondo exterior del grafico sera blanco
  //      chart1.setBackgroundPaint(Color.green);

  // get a reference to the plot for further customisation...
XYPlot  plot = chartTiemposRescatePorRobot.getXYPlot();
  plot.setBackgroundPaint(Color.lightGray); //El fondo interior del grafico sera gris
  //plot.setBackgroundPaint(Color.blue);

  plot.setDomainGridlinePaint(Color.white);  //Las lineas verticales de la cuadricula se pinta de color blanco
  plot.setRangeGridlinePaint(Color.white);  //Las lineas horizontales de la cuadricula se pintan de color blanco
  
      
  ChartPanel chartPanel = new ChartPanel(chartTiemposRescatePorRobot);
  chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
  setContentPane(chartPanel);
  this.pack();
  RefineryUtilities.centerFrameOnScreen(this);
  this.setVisible(true);
}
 
開發者ID:Yarichi,項目名稱:Proyecto-DASI,代碼行數:32,代碼來源:VisualizacionJfreechart.java

示例9: createChartXY

import org.jfree.chart.plot.XYPlot; //導入方法依賴的package包/類
/**
 * Creates a chart.
 *
 * @param dataset
 *            the data for the chart.
 *
 * @return a chart.
 */
private JFreeChart createChartXY(final XYDataset dataset) {

	// create the chart...
	final JFreeChart chart = ChartFactory.createXYLineChart("Line Chart Demo 6", // chart
																					// title
			"X", // x axis label
			"Y", // y axis label
			dataset, // data
			PlotOrientation.VERTICAL, true, // include legend
			true, // tooltips
			false // urls
	);

	// NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...
	chart.setBackgroundPaint(Color.white);

	// final StandardLegend legend = (StandardLegend) chart.getLegend();
	// legend.setDisplaySeriesShapes(true);

	// get a reference to the plot for further customisation...
	final XYPlot plot = chart.getXYPlot();
	plot.setBackgroundPaint(Color.lightGray);
	// plot.setAxisOffset(new Spacer(Spacer.ABSOLUTE, 5.0, 5.0, 5.0, 5.0));
	plot.setDomainGridlinePaint(Color.white);
	plot.setRangeGridlinePaint(Color.white);

	final XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
	renderer.setSeriesLinesVisible(0, false);
	renderer.setSeriesShapesVisible(1, false);
	plot.setRenderer(renderer);

	// change the auto tick unit selection to integer units only...
	final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
	rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
	// OPTIONAL CUSTOMISATION COMPLETED.

	return chart;

}
 
開發者ID:rototor,項目名稱:pdfbox-graphics2d,代碼行數:48,代碼來源:MultiPageTest.java

示例10: createChart

import org.jfree.chart.plot.XYPlot; //導入方法依賴的package包/類
/**
 * Creates a chart.
 * 
 * @param dataset  a dataset.
 * 
 * @return A chart.
 */
private static JFreeChart createChart(XYDataset dataset) {

    JFreeChart chart = ChartFactory.createTimeSeriesChart(
        "Legal & General Unit Trust Prices",  // title
        "Date",             // x-axis label
        "Price Per Unit",   // y-axis label
        dataset,            // data
        true,               // create legend?
        true,               // generate tooltips?
        false               // generate URLs?
    );

    chart.setBackgroundPaint(Color.white);

    XYPlot plot = (XYPlot) chart.getPlot();
    plot.setBackgroundPaint(Color.lightGray);
    plot.setDomainGridlinePaint(Color.white);
    plot.setRangeGridlinePaint(Color.white);
    plot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0));
    plot.setDomainCrosshairVisible(true);
    plot.setRangeCrosshairVisible(true);
    
    XYItemRenderer r = plot.getRenderer();
    if (r instanceof XYLineAndShapeRenderer) {
        XYLineAndShapeRenderer renderer = (XYLineAndShapeRenderer) r;
        renderer.setBaseShapesVisible(true);
        renderer.setBaseShapesFilled(true);
    }
    
    DateAxis axis = (DateAxis) plot.getDomainAxis();
    axis.setDateFormatOverride(new SimpleDateFormat("MMM-yyyy"));
    
    return chart;

}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:43,代碼來源:SWTTimeSeriesDemo.java

示例11: createChart

import org.jfree.chart.plot.XYPlot; //導入方法依賴的package包/類
protected JFreeChart createChart(XYDataset dataset) {
    // create the chart...
    final JFreeChart chart = ChartFactory.createXYLineChart("Quantidade de pixels", "Pixel", "Quantidade", dataset,
            PlotOrientation.VERTICAL, true, // include legend
            true, // tooltips
            false // urls
    );

    chart.setBackgroundPaint(java.awt.Color.white);

    // final StandardLegend legend = (StandardLegend) chart.getLegend();
    // legend.setDisplaySeriesShapes(true);

    // get a reference to the plot for further customisation...
    final XYPlot plot = chart.getXYPlot();
    plot.setBackgroundPaint(java.awt.Color.lightGray);
    // plot.setAxisOffset(new Spacer(Spacer.ABSOLUTE, 5.0, 5.0, 5.0, 5.0));
    plot.setDomainGridlinePaint(java.awt.Color.white);
    plot.setRangeGridlinePaint(java.awt.Color.white);

    // change the auto tick unit selection to integer units only...
    final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
    rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    // OPTIONAL CUSTOMISATION COMPLETED.

    return chart;
}
 
開發者ID:nbfontana,項目名稱:pdi,代碼行數:28,代碼來源:Interface.java

示例12: createChart

import org.jfree.chart.plot.XYPlot; //導入方法依賴的package包/類
private JFreeChart createChart(XYDataset dataset, boolean createLegend) {

		// create the chart...
		JFreeChart chart = ChartFactory.createXYLineChart(null,      // chart title
				null,                      // x axis label
				null,                      // y axis label
				dataset,                  // data
				PlotOrientation.VERTICAL, createLegend,                     // include legend
				true,                     // tooltips
				false                     // urls
				);

		chart.setBackgroundPaint(Color.white);

		// get a reference to the plot for further customization...
		XYPlot plot = (XYPlot) chart.getPlot();
		plot.setBackgroundPaint(Color.WHITE);
		plot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0));
		plot.setDomainGridlinePaint(Color.LIGHT_GRAY);
		plot.setRangeGridlinePaint(Color.LIGHT_GRAY);

		DeviationRenderer renderer = new DeviationRenderer(true, false);
		Stroke stroke = new BasicStroke(2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);
		if (dataset.getSeriesCount() == 1) {
			renderer.setSeriesStroke(0, stroke);
			renderer.setSeriesPaint(0, Color.RED);
			renderer.setSeriesFillPaint(0, Color.RED);
		} else {
			for (int i = 0; i < dataset.getSeriesCount(); i++) {
				renderer.setSeriesStroke(i, stroke);
				Color color = getColorProvider().getPointColor((double) i / (double) (dataset.getSeriesCount() - 1));
				renderer.setSeriesPaint(i, color);
				renderer.setSeriesFillPaint(i, color);
			}
		}
		renderer.setAlpha(0.12f);

		plot.setRenderer(renderer);

		ValueAxis valueAxis = plot.getRangeAxis();
		valueAxis.setLabelFont(LABEL_FONT_BOLD);
		valueAxis.setTickLabelFont(LABEL_FONT);

		return chart;
	}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:46,代碼來源:DeviationChartPlotter.java

示例13: createChart

import org.jfree.chart.plot.XYPlot; //導入方法依賴的package包/類
private JFreeChart createChart(XYDataset dataset) {
	// create the chart...
	JFreeChart chart = ChartFactory.createXYLineChart(null,      // chart title
			null,                      // x axis label
			null,                      // y axis label
			dataset,                  // data
			PlotOrientation.VERTICAL, true,                     // include legend
			true,                     // tooltips
			false                     // urls
			);

	chart.setBackgroundPaint(Color.white);

	// get a reference to the plot for further customisation...
	XYPlot plot = (XYPlot) chart.getPlot();
	plot.setBackgroundPaint(Color.WHITE);
	plot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0));
	plot.setDomainGridlinePaint(Color.LIGHT_GRAY);
	plot.setRangeGridlinePaint(Color.LIGHT_GRAY);

	ValueAxis valueAxis = plot.getRangeAxis();
	valueAxis.setLabelFont(PlotterAdapter.LABEL_FONT_BOLD);
	valueAxis.setTickLabelFont(PlotterAdapter.LABEL_FONT);

	ValueAxis domainAxis = plot.getDomainAxis();
	domainAxis.setLabelFont(PlotterAdapter.LABEL_FONT_BOLD);
	domainAxis.setTickLabelFont(PlotterAdapter.LABEL_FONT);

	DeviationRenderer renderer = new DeviationRenderer(true, false);
	Stroke stroke = new BasicStroke(2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);
	if (dataset.getSeriesCount() == 1) {
		renderer.setSeriesStroke(0, stroke);
		renderer.setSeriesPaint(0, Color.RED);
		renderer.setSeriesFillPaint(0, Color.RED);
	} else if (dataset.getSeriesCount() == 2) {
		renderer.setSeriesStroke(0, stroke);
		renderer.setSeriesPaint(0, Color.RED);
		renderer.setSeriesFillPaint(0, Color.RED);

		renderer.setSeriesStroke(1, stroke);
		renderer.setSeriesPaint(1, Color.BLUE);
		renderer.setSeriesFillPaint(1, Color.BLUE);
	} else {
		for (int i = 0; i < dataset.getSeriesCount(); i++) {
			renderer.setSeriesStroke(i, stroke);
			Color color = colorProvider.getPointColor((double) i / (double) (dataset.getSeriesCount() - 1));
			renderer.setSeriesPaint(i, color);
			renderer.setSeriesFillPaint(i, color);
		}
	}
	renderer.setAlpha(0.12f);
	plot.setRenderer(renderer);

	// legend settings
	LegendTitle legend = chart.getLegend();
	if (legend != null) {
		legend.setPosition(RectangleEdge.TOP);
		legend.setFrame(BlockBorder.NONE);
		legend.setHorizontalAlignment(HorizontalAlignment.LEFT);
		legend.setItemFont(PlotterAdapter.LABEL_FONT);
	}
	return chart;
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:64,代碼來源:ROCChartPlotter.java

示例14: createChart

import org.jfree.chart.plot.XYPlot; //導入方法依賴的package包/類
private JFreeChart createChart(final XYDataset dataset)
           
           {
       
       // create the chart...
       final JFreeChart chart = ChartFactory.createXYLineChart(
           "Line Chart Demo 6",      // chart title
           "X",                      // x axis label
           "Y",                      // y axis label
           dataset,                  // data
           PlotOrientation.VERTICAL,
           true,                     // include legend
           true,                     // tooltips
           false                     // urls
       );

       // NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...
       chart.setBackgroundPaint(Color.white);

//       final StandardLegend legend = (StandardLegend) chart.getLegend();
 //      legend.setDisplaySeriesShapes(true);
       
       // get a reference to the plot for further customisation...
       final XYPlot plot = chart.getXYPlot();
       plot.setBackgroundPaint(Color.lightGray);
   //    plot.setAxisOffset(new Spacer(Spacer.ABSOLUTE, 5.0, 5.0, 5.0, 5.0));
       plot.setDomainGridlinePaint(Color.white);
       plot.setRangeGridlinePaint(Color.white);
       
       final XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
       renderer.setSeriesLinesVisible(0, false);
       renderer.setSeriesShapesVisible(1, false);
       plot.setRenderer(renderer);

       // change the auto tick unit selection to integer units only...
       final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
       rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
       // OPTIONAL CUSTOMISATION COMPLETED.
               
       return chart;
       
   }
 
開發者ID:Yarichi,項目名稱:Proyecto-DASI,代碼行數:43,代碼來源:VisualizacionJfreechart.java

示例15: VisualizarEstadisticasLLegadayAsignacionVictimas

import org.jfree.chart.plot.XYPlot; //導入方法依賴的package包/類
public void VisualizarEstadisticasLLegadayAsignacionVictimas(XYDataset dataset){
  //       XYDataset xyDataset = new XYSeriesCollection(serieDatos);
        
        // Creates a SegmentedTimeline instance, the time scope is "09:30-11:30,13:00-15:00".
          JFreeChart  chart = ChartFactory.createXYLineChart(
            "Victim's Notification and Assignment to Team members ",      // chart title
            "Victim's Notification",                      // x axis label
            "Time in seconds",                      // y axis label
            dataset,                  // data
            PlotOrientation.VERTICAL,
            true,                     // include legend
            true,                     // tooltips
            false                     // urls
        );
          
          
          // NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...
        chart.setBackgroundPaint(Color.white);

//        final StandardLegend legend = (StandardLegend) chart.getLegend();
  //      legend.setDisplaySeriesShapes(true);
        
        // get a reference to the plot for further customisation...
        final XYPlot plot = chart.getXYPlot();
        plot.setBackgroundPaint(Color.lightGray);
    //    plot.setAxisOffset(new Spacer(Spacer.ABSOLUTE, 5.0, 5.0, 5.0, 5.0));

        
        plot.setDomainGridlinePaint(Color.white);
        plot.setRangeGridlinePaint(Color.white);
        
        final XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
        renderer.setSeriesLinesVisible(0, false);
        renderer.setSeriesShapesVisible(1, false);
        plot.setRenderer(renderer);
        // change the auto tick unit selection to integer units only...
        final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
        rangeAxis.setStandardTickUnits(NumberAxis.createStandardTickUnits());
  //      final JFreeChart chart = createChart(dataset);
        final ChartPanel chartPanel = new ChartPanel(chart);
        chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
        setContentPane(chartPanel);
        this.pack();
        RefineryUtilities.centerFrameOnScreen(this);
        this.setVisible(true);                                               
    }
 
開發者ID:Yarichi,項目名稱:Proyecto-DASI,代碼行數:47,代碼來源:VisualizacionJfreechart.java


注:本文中的org.jfree.chart.plot.XYPlot.setDomainGridlinePaint方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。