/** * Sets the range of values used to draw the heatmap. * * @param range a {@code DoubleRange} */ public void setValuesRange(DoubleRange range) { this.lowValue = range.getMin(); this.highValue = range.getMax(); this.colorKey.setLowValue(this.lowValue); this.colorKey.setHighValue(this.highValue); this.initializeColors(); }
/** * Establishes the data matrix of the heatmap. * * @param data a {@code double[][]}. */ public void setData(double[][] data) { this.data = data; this.colorKey.setLowValue(min(data)); this.colorKey.setHighValue(max(data)); this.initializeColors(); invokeLater(() -> { this.heatmapTM.fireTableDataChanged(); this.fixCellSize(); }); }