check determines whether the ColorBar is valid in its current configuration.
()
| 43 | // check determines whether the ColorBar is |
| 44 | // valid in its current configuration. |
| 45 | func (l *ColorBar) check() { |
| 46 | if l.ColorMap == nil { |
| 47 | panic("plotter: nil ColorMap in ColorBar") |
| 48 | } |
| 49 | if l.ColorMap.Max() == l.ColorMap.Min() { |
| 50 | panic("plotter: ColorMap Max==Min") |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | // Plot implements the Plot method of the plot.Plotter interface. |
| 55 | func (l *ColorBar) Plot(c draw.Canvas, p *plot.Plot) { |