Class ChartMinMaxAverageSeriesMeasure
java.lang.Object
org.graphstream.algorithm.measure.ChartMeasure
org.graphstream.algorithm.measure.ChartSeriesMeasure
org.graphstream.algorithm.measure.ChartSeries2DMeasure
org.graphstream.algorithm.measure.ChartMinMaxAverageSeriesMeasure
- Direct Known Subclasses:
DegreeMeasure
public class ChartMinMaxAverageSeriesMeasure extends ChartSeries2DMeasure
A measure to plot special entries composed of a minimum, average and maximum
value.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.graphstream.algorithm.measure.ChartMeasure
ChartMeasure.PlotException, ChartMeasure.PlotOutputType, ChartMeasure.PlotParameters, ChartMeasure.PlotType
-
Field Summary
Fields inherited from class org.graphstream.algorithm.measure.ChartSeriesMeasure
DEFAULT_WINDOW_SIZE
-
Constructor Summary
Constructors Constructor Description ChartMinMaxAverageSeriesMeasure(String name)
-
Method Summary
Modifier and Type Method Description void
addValue(double x, double min, double avg, double max)
Add a new entry to series.org.jfree.chart.JFreeChart
createChart(ChartMeasure.PlotParameters params)
Create a new chart of this measure according to a set of parameters.ChartMeasure.PlotParameters
getDefaultPlotParameters()
Create a default set of parameters to plot this measure.boolean
isSeparateMinMaxAxis()
Flag used to define if min and max are plotted to a different axis than average.void
setSeparateMinMaxAxis(boolean on)
Flag used to define if min and max are plotted to a different axis than average.void
setWindowSize(int size)
Methods inherited from class org.graphstream.algorithm.measure.ChartSeries2DMeasure
addValue, getCount, getXMax, getXMean, getXMin, getXVariance, getYMax, getYMean, getYMin, getYVariance
Methods inherited from class org.graphstream.algorithm.measure.ChartMeasure
outputPlot, outputPlot, plot
-
Constructor Details
-
Method Details
-
setSeparateMinMaxAxis
public void setSeparateMinMaxAxis(boolean on)Flag used to define if min and max are plotted to a different axis than average.- Parameters:
on
- true if a new axis should be created on the right/bottom for min/max series
-
isSeparateMinMaxAxis
public boolean isSeparateMinMaxAxis()Flag used to define if min and max are plotted to a different axis than average.- Returns:
- true if a new axis is created on the right/bottom for min/max series
-
setWindowSize
public void setWindowSize(int size)- Overrides:
setWindowSize
in classChartSeries2DMeasure
-
addValue
public void addValue(double x, double min, double avg, double max)Add a new entry to series.- Parameters:
x
- valuemin
- min valueavg
- average valuemax
- max value
-
createChart
public org.jfree.chart.JFreeChart createChart(ChartMeasure.PlotParameters params) throws ChartMeasure.PlotExceptionDescription copied from class:ChartMeasure
Create a new chart of this measure according to a set of parameters.- Overrides:
createChart
in classChartSeriesMeasure
- Parameters:
params
- the set of parameters used to create the chart- Returns:
- a new chart
- Throws:
ChartMeasure.PlotException
- error during plot
-
getDefaultPlotParameters
Description copied from class:ChartMeasure
Create a default set of parameters to plot this measure.- Overrides:
getDefaultPlotParameters
in classChartSeriesMeasure
- Returns:
- a default PlotParameters adapted to this measure.
-