Class ChartMeasure
java.lang.Object
org.graphstream.algorithm.measure.ChartMeasure
- Direct Known Subclasses:
ChartConnectivityMeasure
,ChartSeriesMeasure
public abstract class ChartMeasure extends Object
This is the base for high level measures. These measures allow to compute
statistical values and plotting.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ChartMeasure.PlotException
Exception that can be raised when trying to plot measures.static class
ChartMeasure.PlotOutputType
Defines the support used for rendering : on screen or in a file.static class
ChartMeasure.PlotParameters
Parameters defining how to plot measures.static class
ChartMeasure.PlotType
Type of plot.s -
Method Summary
Modifier and Type Method Description abstract org.jfree.chart.JFreeChart
createChart(ChartMeasure.PlotParameters params)
Create a new chart of this measure according to a set of parameters.abstract ChartMeasure.PlotParameters
getDefaultPlotParameters()
Create a default set of parameters to plot this measure.static void
outputPlot(ChartMeasure.PlotParameters params, ChartMeasure... measures)
Utility function to calloutputPlot(PlotParameters, JFreeChart...)
withChartMeasure
objects.static void
outputPlot(ChartMeasure.PlotParameters params, org.jfree.chart.JFreeChart... charts)
Output some charts according to a set of parameters.void
plot()
Create a new plot with default plot parameters.abstract void
plot(ChartMeasure.PlotParameters params)
Plot this measure using a set of parameters.
-
Method Details
-
plot
Create a new plot with default plot parameters.- Throws:
ChartMeasure.PlotException
- problem during plot- See Also:
getDefaultPlotParameters()
-
getDefaultPlotParameters
Create a default set of parameters to plot this measure.- Returns:
- a default PlotParameters adapted to this measure.
-
plot
Plot this measure using a set of parameters.- Parameters:
params
- parameters that should be used to plot the measure- Throws:
ChartMeasure.PlotException
- error during plot
-
createChart
public abstract org.jfree.chart.JFreeChart createChart(ChartMeasure.PlotParameters params) throws ChartMeasure.PlotExceptionCreate a new chart of this measure according to a set of parameters.- Parameters:
params
- the set of parameters used to create the chart- Returns:
- a new chart
- Throws:
ChartMeasure.PlotException
- error during plot
-
outputPlot
public static void outputPlot(ChartMeasure.PlotParameters params, ChartMeasure... measures) throws ChartMeasure.PlotExceptionUtility function to calloutputPlot(PlotParameters, JFreeChart...)
withChartMeasure
objects.- Parameters:
params
- set of parameters used to output the plotmeasures
- measures to plot- Throws:
ChartMeasure.PlotException
- error during plot- See Also:
outputPlot(PlotParameters, JFreeChart...)
-
outputPlot
public static void outputPlot(ChartMeasure.PlotParameters params, org.jfree.chart.JFreeChart... charts) throws ChartMeasure.PlotExceptionOutput some charts according to a set of parameters. Actually, only one chart is supported. According toChartMeasure.PlotParameters.outputType
, plot is displayed on screen or saved in a file.- Parameters:
params
- parameters used to plotcharts
- charts to output- Throws:
ChartMeasure.PlotException
- error during plot
-