(r int)
| 69 | return float64(c) |
| 70 | } |
| 71 | func (g unitGrid) Y(r int) float64 { |
| 72 | m, _ := g.Matrix.Dims() |
| 73 | if r < 0 || r >= m { |
| 74 | panic("index out of range") |
| 75 | } |
| 76 | return float64(r) |
| 77 | } |
| 78 | |
| 79 | func TestContour(t *testing.T) { |
| 80 | cmpimg.CheckPlotApprox(ExampleContour, t, 0.01, "contour_"+runtime.GOARCH+".png") |