DataRange implements the DataRange method of the plot.DataRanger interface.
()
| 90 | // DataRange implements the DataRange method |
| 91 | // of the plot.DataRanger interface. |
| 92 | func (l *ColorBar) DataRange() (xmin, xmax, ymin, ymax float64) { |
| 93 | l.check() |
| 94 | if l.Vertical { |
| 95 | return 0, 1, l.ColorMap.Min(), l.ColorMap.Max() |
| 96 | } |
| 97 | return l.ColorMap.Min(), l.ColorMap.Max(), 0, 1 |
| 98 | } |