Class HistogramPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class HistogramPanel extends JPanel
A histogram panel displays a histogram plot as a series of vertical columns.
Since:
3.1.6
Author:
Peter Hollemans
See Also:
  • Constructor Details

    • HistogramPanel

      public HistogramPanel()
      Creates a new histogram panel with no data.
    • HistogramPanel

      public HistogramPanel(Statistics stats)
      Creates a new histogram panel with the specified data.
      Parameters:
      stats - the histogram statistics.
  • Method Details

    • paintComponent

      public void paintComponent(Graphics g)
      Overrides:
      paintComponent in class JComponent
    • getStatistics

      public Statistics getStatistics()
      Gets the current statistics.
    • setStatistics

      public void setStatistics(Statistics stats)
      Sets the current statistics.
    • setRange

      public void setRange(double[] range)
      Sets the data value range. The range is used in combination with the statistics to determine the position of the vertical column shown in the histogram. By default the range is determined from the statistics.
      Parameters:
      range - the data value range as [min, max].