diff --git a/tools/rw-heatmaps/pkg/chart/heatmap.go b/tools/rw-heatmaps/pkg/chart/heatmap.go index eef8e04ac161..f61cff0e097d 100644 --- a/tools/rw-heatmaps/pkg/chart/heatmap.go +++ b/tools/rw-heatmaps/pkg/chart/heatmap.go @@ -71,7 +71,7 @@ func plotIndividualHeatMap(title, plotType string, records []dataset.DataRecord) // Populate X and Y axis data from records xCoords, yCoords := populateGridAxes(records) - gridData := &HeatMapGrid{ + gridData := &heatMapGrid{ x: xCoords, y: yCoords, z: make([][]float64, len(yCoords)), diff --git a/tools/rw-heatmaps/pkg/chart/heatmap_grid.go b/tools/rw-heatmaps/pkg/chart/heatmap_grid.go index 5355264e9f1f..165a5d522ad6 100644 --- a/tools/rw-heatmaps/pkg/chart/heatmap_grid.go +++ b/tools/rw-heatmaps/pkg/chart/heatmap_grid.go @@ -14,27 +14,27 @@ package chart -// HeatMapGrid holds X, Y, Z values for a heatmap. -type HeatMapGrid struct { +// heatMapGrid holds X, Y, Z values for a heatmap. +type heatMapGrid struct { x, y []float64 z [][]float64 // The Z values should be arranged in a 2D slice. } // Dims returns the number of elements in the grid. // It implements the plotter.GridXYZ interface. -func (h *HeatMapGrid) Dims() (int, int) { +func (h *heatMapGrid) Dims() (int, int) { return len(h.x), len(h.y) } // Z returns the value of a grid cell at (c, r). // It implements the plotter.GridXYZ interface. -func (h *HeatMapGrid) Z(c, r int) float64 { +func (h *heatMapGrid) Z(c, r int) float64 { return h.z[r][c] } // X returns the coordinate for the column at index c. // It implements the plotter.GridXYZ interface. -func (h *HeatMapGrid) X(c int) float64 { +func (h *heatMapGrid) X(c int) float64 { if c >= len(h.x) { panic("index out of range") } @@ -43,7 +43,7 @@ func (h *HeatMapGrid) X(c int) float64 { // Y returns the coordinate for the row at index r. // It implements the plotter.GridXYZ interface. -func (h *HeatMapGrid) Y(r int) float64 { +func (h *heatMapGrid) Y(r int) float64 { if r >= len(h.y) { panic("index out of range") }