Class HeatMapBuilder

java.lang.Object
org.moeaframework.analysis.plot.PlotBuilder<HeatMapBuilder>
org.moeaframework.analysis.plot.HeatMapBuilder

public class HeatMapBuilder extends PlotBuilder<HeatMapBuilder>
Constructs a 2D heat map. The map is a raster produced from a 2D grid, defined by the X and Y coordinates, and a paint scale that maps values to colors.
  • Constructor Details

    • HeatMapBuilder

      public HeatMapBuilder()
      Constructs a new, empty heat map builder.
  • Method Details

    • getInstance

      protected HeatMapBuilder getInstance()
      Description copied from class: PlotBuilder
      Returns an instance of this builder cast to the concrete implementation type PlotBuilder. This is used by any intermediate classes to returns the concrete implementation.
      Specified by:
      getInstance in class PlotBuilder<HeatMapBuilder>
      Returns:
      a reference to this builder instance
    • build

      public org.jfree.chart.JFreeChart build()
      Description copied from class: PlotBuilder
      Builds and returns the configured plot.
      Specified by:
      build in class PlotBuilder<HeatMapBuilder>
      Returns:
      the resulting plot
    • xLabel

      public HeatMapBuilder xLabel(String label)
      Sets the X axis label.
      Parameters:
      label - the label for the X axis
      Returns:
      a reference to this builder
    • yLabel

      public HeatMapBuilder yLabel(String label)
      Sets the Y axis label.
      Parameters:
      label - the label for the Y axis
      Returns:
      a reference to this builder
    • zLabel

      public HeatMapBuilder zLabel(String label)
      Sets the Z axis label.
      Parameters:
      label - the label for the Z axis
      Returns:
      a reference to this builder
    • xCoords

      public HeatMapBuilder xCoords(double[] x)
      Sets the X coordinates defining the grid.
      Parameters:
      x - the X coordinates
      Returns:
      a reference to this builder
    • xCoords

      public HeatMapBuilder xCoords(List<? extends Number> x)
      Sets the X coordinates defining the grid.
      Parameters:
      x - the X coordinates
      Returns:
      a reference to this builder
    • yCoords

      public HeatMapBuilder yCoords(double[] y)
      Sets the Y coordinates defining the grid.
      Parameters:
      y - the Y coordinates
      Returns:
      a reference to this builder
    • yCoords

      public HeatMapBuilder yCoords(List<? extends Number> y)
      Sets the Y coordinates defining the grid.
      Parameters:
      y - the Y coordinates
      Returns:
      a reference to this builder
    • zData

      public HeatMapBuilder zData(double[][] z)
      Sets the Z data that define the color of each grid coordinate.
      Parameters:
      z - the Z values
      Returns:
      a reference to this builder
    • zData

      public HeatMapBuilder zData(List<? extends List<? extends Number>> z)
      Sets the Z data that define the color of each grid coordinate.
      Parameters:
      z - the Z values
      Returns:
      a reference to this builder
    • style

      public HeatMapBuilder style(PlotAttribute... attributes)
      Sets the style of the heat map.
      Parameters:
      attributes - the attributes configuring the plot
      Returns:
      a reference to this builder
    • data

      public HeatMapBuilder data(Partition<? extends org.apache.commons.lang3.tuple.Pair<? extends Number,? extends Number>,? extends Number> partition, StyleAttribute... style)
      Sets the X, Y, and Z values based on a Partition.
      Parameters:
      partition - the data stream partition
      style - the style attributes
      Returns:
      a reference to this instance