Class HistogramPlot


  • public class HistogramPlot
    extends Plot
    Implements a histogram plot.
    • Constructor Detail

      • HistogramPlot

        public HistogramPlot​(String xLabel,
                             int numBins)
        Creates a new HistogramPlot
        Parameters:
        xLabel - Label of the x axis
        numBins - Number of bins of the histogram
    • Method Detail

      • addValue

        public HistogramPlot addValue​(double value)
        Adds new value to the histogram
        Parameters:
        value - Value
        Returns:
        Self HistogramPlot instance
      • printData

        public void printData()
        Description copied from class: Plot
        Prints the plot data into the standard output
        Overrides:
        printData in class Plot
      • printData

        public void printData​(String axisTicksFormat)
        Description copied from class: Plot
        Prints the plot data into the standard output
        Overrides:
        printData in class Plot
        Parameters:
        axisTicksFormat - Number format of the axis
      • toString

        public String toString​(String axisTicksFormat)
        Description copied from class: Plot
        Stringify the plot data
        Overrides:
        toString in class Plot
        Parameters:
        axisTicksFormat - Number format for the values of the axis
        Returns:
        Plot's data stringified
      • getDataHeaders

        protected String[] getDataHeaders()
        Description copied from class: Plot
        Returns an String array with the headers of the plot's data
        Specified by:
        getDataHeaders in class Plot
        Returns:
        Headers of the plot's data
      • getDataContent

        protected String[][] getDataContent​(String xAxisTicksFormat,
                                            String yAxisTicksFormat)
        Description copied from class: Plot
        Returns an String matrix with the content of the plot's data. First dimension denotes the row and second dimension denotes the column that must be correlated with the header returned by getDataHeaders().
        Specified by:
        getDataContent in class Plot
        Parameters:
        xAxisTicksFormat - Number format for the values of the x axis
        yAxisTicksFormat - Number format for the values of the x axis
        Returns:
        String matrix with the content of the plot's data
      • getGralPlot

        protected de.erichseifert.gral.plots.AbstractPlot getGralPlot()
        Description copied from class: Plot
        Gets an AbstractPlot using GRAL
        Specified by:
        getGralPlot in class Plot
        Returns:
        GRAL's AbstractPlot