HeatMap implements the Plotter interface, drawing a heat map of the values in the GridXYZ field.
| 37 | // HeatMap implements the Plotter interface, drawing |
| 38 | // a heat map of the values in the GridXYZ field. |
| 39 | type HeatMap struct { |
| 40 | GridXYZ GridXYZ |
| 41 | |
| 42 | // Palette is the color palette used to render |
| 43 | // the heat map. Palette must not be nil or |
| 44 | // return a zero length []color.Color. |
| 45 | Palette palette.Palette |
| 46 | |
| 47 | // Underflow and Overflow are colors used to fill |
| 48 | // heat map elements outside the dynamic range |
| 49 | // defined by Min and Max. |
| 50 | Underflow color.Color |
| 51 | Overflow color.Color |
| 52 | |
| 53 | // NaN is the color used to fill heat map elements |
| 54 | // that are NaN or do not map to a unique palette |
| 55 | // color. |
| 56 | NaN color.Color |
| 57 | |
| 58 | // Min and Max define the dynamic range of the |
| 59 | // heat map. |
| 60 | Min, Max float64 |
| 61 | |
| 62 | // Rasterized indicates whether the heatmap |
| 63 | // should be produced using raster-based drawing. |
| 64 | Rasterized bool |
| 65 | } |
| 66 | |
| 67 | // NewHeatMap creates as new heat map plotter for the given data, |
| 68 | // using the provided palette. If g has Min and Max methods that return |
nothing calls this directly
no outgoing calls
no test coverage detected