本文整理匯總了Java中org.jfree.data.xy.IntervalXYDataset類的典型用法代碼示例。如果您正苦於以下問題:Java IntervalXYDataset類的具體用法?Java IntervalXYDataset怎麽用?Java IntervalXYDataset使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
IntervalXYDataset類屬於org.jfree.data.xy包,在下文中一共展示了IntervalXYDataset類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createDataset1
import org.jfree.data.xy.IntervalXYDataset; //導入依賴的package包/類
/**
* Creates a sample dataset.
*
* @return Series 1.
*/
private IntervalXYDataset createDataset1() {
// create dataset 1...
TimeSeries series1 = new TimeSeries("Series 1", Day.class);
series1.add(new Day(1, MonthConstants.MARCH, 2002), 12353.3);
series1.add(new Day(2, MonthConstants.MARCH, 2002), 13734.4);
series1.add(new Day(3, MonthConstants.MARCH, 2002), 14525.3);
series1.add(new Day(4, MonthConstants.MARCH, 2002), 13984.3);
series1.add(new Day(5, MonthConstants.MARCH, 2002), 12999.4);
series1.add(new Day(6, MonthConstants.MARCH, 2002), 14274.3);
series1.add(new Day(7, MonthConstants.MARCH, 2002), 15943.5);
series1.add(new Day(8, MonthConstants.MARCH, 2002), 14845.3);
series1.add(new Day(9, MonthConstants.MARCH, 2002), 14645.4);
series1.add(new Day(10, MonthConstants.MARCH, 2002), 16234.6);
series1.add(new Day(11, MonthConstants.MARCH, 2002), 17232.3);
series1.add(new Day(12, MonthConstants.MARCH, 2002), 14232.2);
series1.add(new Day(13, MonthConstants.MARCH, 2002), 13102.2);
series1.add(new Day(14, MonthConstants.MARCH, 2002), 14230.2);
series1.add(new Day(15, MonthConstants.MARCH, 2002), 11235.2);
TimeSeriesCollection collection = new TimeSeriesCollection(series1);
return collection;
}
示例2: createChart
import org.jfree.data.xy.IntervalXYDataset; //導入依賴的package包/類
/**
* Creates a sample chart.
*
* @param dataset the dataset.
*
* @return A sample chart.
*/
private JFreeChart createChart(IntervalXYDataset dataset,String s) {
final JFreeChart chart = ChartFactory.createXYBarChart(
"Histogram Plot: "+s,
"Keyword index",
false,
"frequency",
dataset,
PlotOrientation.VERTICAL,
true,
true,
false
);
XYPlot plot = (XYPlot) chart.getPlot();
final IntervalMarker target = new IntervalMarker(400.0, 700.0);
//target.setLabel("Target Range");
target.setLabelFont(new Font("SansSerif", Font.ITALIC, 11));
target.setLabelAnchor(RectangleAnchor.LEFT);
target.setLabelTextAnchor(TextAnchor.CENTER_LEFT);
target.setPaint(new Color(222, 222, 255, 128));
plot.addRangeMarker(target, Layer.BACKGROUND);
return chart;
}
示例3: createChart
import org.jfree.data.xy.IntervalXYDataset; //導入依賴的package包/類
/**
* Create a horizontal bar chart with sample data in the range -3 to +3.
*
* @return The chart.
*/
private static JFreeChart createChart() {
// create a dataset...
XYSeries series1 = new XYSeries("Series 1");
series1.add(1.0, 1.0);
series1.add(2.0, 2.0);
series1.add(3.0, 3.0);
IntervalXYDataset dataset = new XYBarDataset(new XYSeriesCollection(
series1), 1.0);
// create the chart...
return ChartFactory.createXYBarChart(
"XY Bar Chart", // chart title
"Domain", false,
"Range",
dataset, // data
PlotOrientation.VERTICAL,
true, // include legend
true, // tooltips
true // urls
);
}
示例4: createChart
import org.jfree.data.xy.IntervalXYDataset; //導入依賴的package包/類
/**
* Create a horizontal bar chart with sample data in the range -3 to +3.
*
* @return The chart.
*/
private static JFreeChart createChart() {
XYSeries series1 = new XYSeries("Series 1");
series1.add(1.0, 1.0);
series1.add(2.0, 2.0);
series1.add(3.0, 3.0);
IntervalXYDataset dataset = new XYBarDataset(new XYSeriesCollection(
series1), 1.0);
return ChartFactory.createXYBarChart("XY Bar Chart", "Domain", false,
"Range", dataset);
}
示例5: createDataset1
import org.jfree.data.xy.IntervalXYDataset; //導入依賴的package包/類
/**
* Creates a sample dataset.
*
* @return Series 1.
*/
private IntervalXYDataset createDataset1() {
// create dataset 1...
TimeSeries series1 = new TimeSeries("Series 1");
series1.add(new Day(1, MonthConstants.MARCH, 2002), 12353.3);
series1.add(new Day(2, MonthConstants.MARCH, 2002), 13734.4);
series1.add(new Day(3, MonthConstants.MARCH, 2002), 14525.3);
series1.add(new Day(4, MonthConstants.MARCH, 2002), 13984.3);
series1.add(new Day(5, MonthConstants.MARCH, 2002), 12999.4);
series1.add(new Day(6, MonthConstants.MARCH, 2002), 14274.3);
series1.add(new Day(7, MonthConstants.MARCH, 2002), 15943.5);
series1.add(new Day(8, MonthConstants.MARCH, 2002), 14845.3);
series1.add(new Day(9, MonthConstants.MARCH, 2002), 14645.4);
series1.add(new Day(10, MonthConstants.MARCH, 2002), 16234.6);
series1.add(new Day(11, MonthConstants.MARCH, 2002), 17232.3);
series1.add(new Day(12, MonthConstants.MARCH, 2002), 14232.2);
series1.add(new Day(13, MonthConstants.MARCH, 2002), 13102.2);
series1.add(new Day(14, MonthConstants.MARCH, 2002), 14230.2);
series1.add(new Day(15, MonthConstants.MARCH, 2002), 11235.2);
TimeSeriesCollection collection = new TimeSeriesCollection(series1);
return collection;
}
示例6: createPopCellLengthBeforAfterDivisionChart
import org.jfree.data.xy.IntervalXYDataset; //導入依賴的package包/類
/**
* TODO Documentation
* TODO Refactor to fit DistributionChart2D
*
* @param dataset
* @return
*/
private JFreeChart createPopCellLengthBeforAfterDivisionChart(IntervalXYDataset dataset) {
String lengthUnit = "μm"; // Set default value
if (forest != null) {
lengthUnit = forest.getMetaxml().getAllCellsInMetaXML().get(0).getLengthUnit();
}
final JFreeChart chartLocal = ChartFactory.createHistogram(
"Cell length before and after division",
String.format("Cell length [%s]", lengthUnit),
"Distribution",
dataset,
PlotOrientation.VERTICAL,
true,
true,
false
);
styleChart(chartLocal);
return chartLocal;
}
示例7: createPopDivisionTimesChart
import org.jfree.data.xy.IntervalXYDataset; //導入依賴的package包/類
/**
* TODO Documentation
*
* @param dataset
* @return
*/
private JFreeChart createPopDivisionTimesChart(IntervalXYDataset dataset) {
String timeUnit = "min"; // Set default value
if (forest != null) {
timeUnit = forest.getMetaxml().getExperimentDurationUnit();
}
final JFreeChart chartLocal = ChartFactory.createHistogram(
"Division times distribution",
String.format("Division times [%s]", timeUnit),
"Occurrence [-]",
dataset,
PlotOrientation.VERTICAL,
true,
true,
false
);
styleChart(chartLocal);
return chartLocal;
}
示例8: PopulationElongationrateDistributionChart2D
import org.jfree.data.xy.IntervalXYDataset; //導入依賴的package包/類
/**
* Constructs a {@link PopulationElongationrateDistributionChart2D} from a
* {@link Forest}.
*
* @param forest
* The underlying data model for a chart.
*/
public PopulationElongationrateDistributionChart2D(Forest forest) {
super(forest);
if(forest != null) {
this.setLayout(new BorderLayout());
colorPalette = new LinkedList<Color>();
final IntervalXYDataset dataset = createPopElongationrateDataset(forest);
final JFreeChart chart = createPopElongationrateChart(dataset);
final ChartPanel chartPanel = new ChartPanel(chart);
chartPanel.setPreferredSize(new Dimension(800, 250));
chartPanel.setFillZoomRectangle(true);
chartPanel.setMouseZoomable(true, false);
chartPanel.setBorder(BorderFactory.createLineBorder(new java.awt.Color(214, 214, 214)));
legendPanel = createLegendPanel(chart);
this.add(BorderLayout.CENTER, chartPanel);
this.add(BorderLayout.EAST, legendPanel);
this.setBackground(Color.white);
} else {
throw new IllegalArgumentException("Error");
}
}
示例9: createPopElongationrateChart
import org.jfree.data.xy.IntervalXYDataset; //導入依賴的package包/類
/**
* TODO Documentation
*
* @param dataset
* @return
*/
private JFreeChart createPopElongationrateChart(IntervalXYDataset dataset) {
final JFreeChart chartLocal = ChartFactory.createHistogram(
"Cell elongatrion rate",
"Elongation rate [mu/min]",
"Distribution",
dataset,
PlotOrientation.VERTICAL,
true,
true,
false
);
styleChart(chartLocal);
return chartLocal;
}
示例10: createChart
import org.jfree.data.xy.IntervalXYDataset; //導入依賴的package包/類
/**
* Creates a chart.
*
* @param dataset the dataset.
*
* @return a chart.
*/
protected JFreeChart createChart(IntervalXYDataset dataset) {
JFreeChart chart = ChartFactory.createXYBarChart(
chartTitle, // chart title
"Date", // domain axis label
true,
"Y", // range axis label
dataset, // data
PlotOrientation.VERTICAL,
!legendPanelOn, // include legend
true,
false
);
// NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...
XYPlot plot = chart.getXYPlot();
plot.setRenderer(new ClusteredXYBarRenderer());
// OPTIONAL CUSTOMISATION COMPLETED.
return chart;
}
示例11: createLegend
import org.jfree.data.xy.IntervalXYDataset; //導入依賴的package包/類
protected JFreeChart createLegend(IntervalXYDataset dataset) {
JFreeChart chart = ChartFactory.createXYBarChart(
chartTitle, // chart title
"Date", // domain axis label
true,
"Y", // range axis label
dataset, // data
PlotOrientation.VERTICAL,
true, // include legend
true,
false
);
// NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...
XYPlot plot = chart.getXYPlot();
plot.setRenderer(new ClusteredXYBarRenderer());
return chart;
}
示例12: createChart
import org.jfree.data.xy.IntervalXYDataset; //導入依賴的package包/類
/**
* Creates a new chart.
*
* @param dataset the dataset.
*
* @return The chart.
*/
protected JFreeChart createChart(IntervalXYDataset dataset) {
JFreeChart chart = ChartFactory.createScatterPlot(
chartTitle, // chart title
domainLabel, // domain axis label
rangeLabel, // range axis label
dataset, // data
PlotOrientation.VERTICAL,
!legendPanelOn, // include legend
true,
false
);
XYPlot plot = chart.getXYPlot();
plot.setRenderer(new YIntervalRenderer());
setXSummary(dataset);
return chart;
}
示例13: createDatasetNumberRequestsTampered
import org.jfree.data.xy.IntervalXYDataset; //導入依賴的package包/類
private IntervalXYDataset createDatasetNumberRequestsTampered()
{
Date currentDate;
long currentMsTs;
final TimeSeries series = new TimeSeries( "Sent Tampered Requests per Second" );
if ( model.getMapLogEntryIntervalTampered() != null )
{
for ( Map.Entry<Integer, LogEntryInterval> log : model.getMapLogEntryIntervalTampered().entrySet() )
{
// Create TS from model.startTime and log.getIntervalNumber();
currentMsTs = model.getTsAttackStart() + log.getValue().getIntervalNumber();
currentDate = new Date( currentMsTs );
series.add( new Second( currentDate ), ( log.getValue().getNumberRequests() ) );
}
}
final TimeSeriesCollection dataset = new TimeSeriesCollection( series );
dataset.setXPosition( TimePeriodAnchor.MIDDLE );
return dataset;
}
示例14: crearHistograma
import org.jfree.data.xy.IntervalXYDataset; //導入依賴的package包/類
private JFreeChart crearHistograma(IntervalXYDataset datos) {
JFreeChart jfreechart = ChartFactory.
createHistogram("Histograma", "X","Y", datos, PlotOrientation.VERTICAL, false, false, false);
//createHistogram("Histograma", "X","Y", datos, PlotOrientation.VERTICAL, false, false, false);
//createXYBarChart("Histograma", "X", false, "Y", datos, PlotOrientation.VERTICAL, false, false, false);
//jfreechart.getCategoryPlot();
jfreechart.getPlot().setOutlinePaint(Color.black);
XYPlot cp=(XYPlot)jfreechart.getPlot();
XYBarRenderer renderer=(XYBarRenderer)cp.getRenderer();
cp.setWeight(80);
renderer.setSeriesPaint(0,Color.GRAY);
jfreechart.setAntiAlias(true);
jfreechart.setBackgroundPaint(Color.white);
return jfreechart;
}
示例15: doChart
import org.jfree.data.xy.IntervalXYDataset; //導入依賴的package包/類
/**
* create chart using data from the dataTable
*/
public void doChart(){
if(dataTable.isEditing())
dataTable.getCellEditor().stopCellEditing();
if (! hasExample ) {
SOCROptionPane.showMessageDialog(this, DATA_MISSING_MESSAGE);
resetChart();
return;
}
isDemo = false;
IntervalXYDataset dataset = createDataset(isDemo);
JFreeChart chart = createChart(dataset);
chartPanel = new ChartPanel(chart, isDemo);
setChart();
}