本文整理匯總了Java中org.jfree.chart.renderer.xy.XYLineAndShapeRenderer.setSeriesOutlinePaint方法的典型用法代碼示例。如果您正苦於以下問題:Java XYLineAndShapeRenderer.setSeriesOutlinePaint方法的具體用法?Java XYLineAndShapeRenderer.setSeriesOutlinePaint怎麽用?Java XYLineAndShapeRenderer.setSeriesOutlinePaint使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.jfree.chart.renderer.xy.XYLineAndShapeRenderer
的用法示例。
在下文中一共展示了XYLineAndShapeRenderer.setSeriesOutlinePaint方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createChart
import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //導入方法依賴的package包/類
private JFreeChart createChart(XYDataset dataset) {
JFreeChart chart = ChartFactory.createScatterPlot(this.title,
this.xAxisLabel, this.yAxisLable, dataset, PlotOrientation.VERTICAL, true, true, false);
XYPlot plot = (XYPlot) chart.getPlot();
plot.setNoDataMessage("NO DATA");
XYLineAndShapeRenderer renderer
= (XYLineAndShapeRenderer) plot.getRenderer();
renderer.setSeriesOutlinePaint(0, Color.black);
renderer.setUseOutlinePaint(true);
NumberAxis domainAxis = (NumberAxis) plot.getDomainAxis();
domainAxis.setAutoRangeIncludesZero(false);
return chart;
}
示例2: OrderParameterVsRandomnessChart
import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //導入方法依賴的package包/類
public OrderParameterVsRandomnessChart( int maxItemCount ) {
this.maxItemCount = maxItemCount;
meanSeries = new XYSeries( "Raw Data" );
lineSeries = new XYSeries( "Mean Values" );
xySeriesCollection = new XYSeriesCollection( meanSeries );
xySeriesCollection.addSeries( lineSeries );
domainAxis = new NumberAxis( "Randomness" );
rangeAxis = new NumberAxis( "Order Parameter" );
renderer = new XYLineAndShapeRenderer();
int RAW_DATA_SERIES = 0;
int LINE_SERIES = 1;
renderer.setSeriesShape( RAW_DATA_SERIES, new Ellipse2D.Double( -3, -3, 6, 6 ) );
renderer.setSeriesShape( LINE_SERIES, new Rectangle( -4, -4, 8, 8 ) );
renderer.setSeriesLinesVisible( RAW_DATA_SERIES, false );
renderer.setSeriesShapesVisible( RAW_DATA_SERIES, true );
Color blue = new Color( 0, 0, 255, 14 );
renderer.setSeriesPaint( RAW_DATA_SERIES, blue );
renderer.setSeriesItemLabelPaint( RAW_DATA_SERIES, blue );
renderer.setSeriesOutlinePaint( RAW_DATA_SERIES, blue );
renderer.setSeriesLinesVisible( LINE_SERIES, true );
xyPlot = new XYPlot( xySeriesCollection,
domainAxis,
rangeAxis, renderer );
chart = new JFreeChart( "Order Parameter vs. Randomness", xyPlot );
rangeAxis.setRange( -0.01, 1.01 );
domainAxis.setAutoRange( false );
domainAxis.setRange( 0 - 0.01, Math.PI * 2 + 0.01 );
}
示例3: createScatterChart
import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //導入方法依賴的package包/類
@Override
protected JFreeChart createScatterChart() throws JRException
{
JFreeChart jfreeChart = super.createScatterChart();
XYPlot xyPlot = (XYPlot) jfreeChart.getPlot();
xyPlot.setRangeGridlinePaint(SCATTER_GRIDLINE_COLOR);
xyPlot.setRangeGridlineStroke(new BasicStroke(0.75f));
xyPlot.setDomainGridlinesVisible(true);
xyPlot.setDomainGridlinePaint(SCATTER_GRIDLINE_COLOR);
xyPlot.setDomainGridlineStroke(new BasicStroke(0.75f));
xyPlot.setRangeZeroBaselinePaint(ChartThemesConstants.GRAY_PAINT_134);
XYLineAndShapeRenderer lineRenderer = (XYLineAndShapeRenderer)xyPlot.getRenderer();
lineRenderer.setUseFillPaint(true);
JRScatterPlot scatterPlot = (JRScatterPlot) getPlot();
boolean isShowLines = scatterPlot.getShowLines() == null ? false : scatterPlot.getShowLines().booleanValue();
lineRenderer.setBaseLinesVisible(isShowLines);
XYDataset xyDataset = xyPlot.getDataset();
if (xyDataset != null)
{
for (int i = 0; i < xyDataset.getSeriesCount(); i++)
{
lineRenderer.setSeriesOutlinePaint(i, ChartThemesConstants.TRANSPARENT_PAINT);
lineRenderer.setSeriesFillPaint(i, ChartThemesConstants.EYE_CANDY_SIXTIES_GRADIENT_PAINTS.get(i));
lineRenderer.setSeriesPaint(i, ChartThemesConstants.EYE_CANDY_SIXTIES_COLORS.get(i));
//lineRenderer.setSeriesShape(i, new Ellipse2D.Double(-3, -3, 6, 6));
}
}
return jfreeChart;
}
示例4: configureXYLineAndShapeRenderer
import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //導入方法依賴的package包/類
private static void configureXYLineAndShapeRenderer(XYLineAndShapeRenderer renderer, ValueSource valueSource,
PlotInstance plotInstance) {
renderer.setBaseToolTipGenerator(new StandardXYToolTipGenerator());
SeriesFormat seriesFormat = valueSource.getSeriesFormat();
DimensionConfig domainConfig = valueSource.getDomainConfig();
DimensionConfig colorDimensionConfig = plotInstance.getCurrentPlotConfigurationClone().getDimensionConfig(
PlotDimension.COLOR);
DimensionConfig shapeDimensionConfig = plotInstance.getCurrentPlotConfigurationClone().getDimensionConfig(
PlotDimension.SHAPE);
ValueSourceData valueSourceData = plotInstance.getPlotData().getValueSourceData(valueSource);
int seriesCount = valueSourceData.getSeriesDataForAllGroupCells().groupCellCount();
// Loop all series and set series format.
// Format based on dimension configs will be set later on in initFormatDelegate().
for (int seriesIdx = 0; seriesIdx < seriesCount; ++seriesIdx) {
// configure linestyle
if (seriesFormat.getLineStyle() == LineStyle.NONE) {
renderer.setSeriesLinesVisible(seriesIdx, false);
} else {
renderer.setSeriesLinesVisible(seriesIdx, true);
renderer.setSeriesStroke(seriesIdx, seriesFormat.getStroke(), false);
}
// configure series shape if necessary
if (!SeriesFormat.calculateIndividualFormatForEachItem(domainConfig, shapeDimensionConfig)) {
if (seriesFormat.getItemShape() != ItemShape.NONE) {
renderer.setSeriesShapesVisible(seriesIdx, true);
renderer.setSeriesShape(seriesIdx, seriesFormat.getItemShape().getShape());
} else {
renderer.setSeriesShapesVisible(seriesIdx, false);
}
}
// configure series color if necessary
if (!SeriesFormat.calculateIndividualFormatForEachItem(domainConfig, colorDimensionConfig)) {
Color itemColor = seriesFormat.getItemColor();
renderer.setSeriesPaint(seriesIdx, itemColor);
renderer.setSeriesFillPaint(seriesIdx, itemColor);
}
renderer.setSeriesOutlinePaint(seriesIdx, PlotConfiguration.DEFAULT_SERIES_OUTLINE_PAINT);
renderer.setUseOutlinePaint(true);
}
}
示例5: createChart
import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //導入方法依賴的package包/類
public static JFreeChart createChart(XYDataset xydataset, String shou, String shu) {
JFreeChart jfreechart = ChartFactory.createScatterPlot("Rating and Rating People Distribution", shou, shu,
xydataset, PlotOrientation.VERTICAL, true, false, false);
jfreechart.setBackgroundPaint(Color.white);
jfreechart.setBorderPaint(Color.GREEN);
XYPlot xyplot = (XYPlot) jfreechart.getPlot();
xyplot.setNoDataMessage("no data");
xyplot.setNoDataMessageFont(new Font("微軟雅黑", Font.BOLD, 14));
xyplot.setNoDataMessagePaint(Color.blue);
xyplot.setBackgroundPaint(Color.lightGray);
TextTitle textTitle = jfreechart.getTitle();
textTitle.setFont(new Font("宋體", Font.BOLD, 20));
LegendTitle legend = jfreechart.getLegend();
if (legend != null) {
legend.setItemFont(new Font("宋體", Font.BOLD, 20));
}
XYLineAndShapeRenderer renderer = (XYLineAndShapeRenderer) xyplot.getRenderer();
renderer.setBaseShapesVisible(true);
renderer.setDrawOutlines(true);
renderer.setSeriesOutlinePaint(0, Color.WHITE);
renderer.setUseOutlinePaint(true);
renderer.setSeriesOutlineStroke(1, new BasicStroke(0.5F));
xyplot.setRenderer(renderer);
NumberAxis numberaxis = (NumberAxis) xyplot.getDomainAxis();
numberaxis.setTickMarkInsideLength(3.0F);
numberaxis.setTickMarkOutsideLength(0.0F);
numberaxis.setUpperBound(280000);
numberaxis.setLowerBound(50000);
numberaxis.setAxisLineStroke(new BasicStroke(1.5f));
NumberAxis numberaxis1 = (NumberAxis) xyplot.getRangeAxis();
numberaxis1.setUpperBound(10.0);
numberaxis1.setLowerBound(5.0);
NumberTickUnit ntu1 = new NumberTickUnit(0.5);
numberaxis1.setTickUnit(ntu1);
return jfreechart;
}
示例6: BetaChart
import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //導入方法依賴的package包/類
public BetaChart( int maxItemCount ) {
this.maxItemCount = maxItemCount;
meanSeries = new XYSeries( "Raw Data" );
lineSeries = new XYSeries( "Mean Values" );
bestFitSeries = new XYSeries( "Best Fit" );
xySeriesCollection = new XYSeriesCollection( meanSeries );
xySeriesCollection.addSeries( lineSeries );
xySeriesCollection.addSeries( bestFitSeries );
domainAxis = new NumberAxis( "ln[(c-r)/c]" );
rangeAxis = new NumberAxis( "ln(Order Parameter)" );
renderer = new XYLineAndShapeRenderer();
int RAW_DATA_SERIES = 0;
int LINE_SERIES = 1;
int BEST_FIT_SERIES = 2;
renderer.setSeriesShape( RAW_DATA_SERIES, new Ellipse2D.Double( -3, -3, 6, 6 ) );
renderer.setSeriesShape( LINE_SERIES, new Rectangle( -4, -4, 8, 8 ) );
renderer.setSeriesLinesVisible( RAW_DATA_SERIES, false );
renderer.setSeriesShapesVisible( RAW_DATA_SERIES, true );
Color blue = new Color( 0, 0, 255, 14 );
renderer.setSeriesPaint( RAW_DATA_SERIES, blue );
renderer.setSeriesItemLabelPaint( RAW_DATA_SERIES, blue );
renderer.setSeriesOutlinePaint( RAW_DATA_SERIES, blue );
renderer.setSeriesLinesVisible( LINE_SERIES, true );
renderer.setSeriesLinesVisible( BEST_FIT_SERIES, true );
renderer.setSeriesShapesVisible( BEST_FIT_SERIES, false );
renderer.setSeriesStroke( BEST_FIT_SERIES, new BasicStroke( 2 ) );
renderer.setSeriesPaint( BEST_FIT_SERIES, Color.green );
xyPlot = new XYPlot( xySeriesCollection,
domainAxis,
rangeAxis, renderer );
chart = new JFreeChart( "Critical Exponent Log Plot", xyPlot );
rangeAxis.setAutoRange( true );
rangeAxis.setAutoRangeIncludesZero( false );
domainAxis.setAutoRange( true );
domainAxis.setAutoRangeIncludesZero( false );
}