MCPcopy Index your code
hub / github.com/gonum/plot / CheckPlot

Function CheckPlot

cmpimg/checkplot.go:31–35  ·  view source on GitHub ↗

CheckPlot checks a generated plot against a previously created reference. If GenerateTestData = true, it regenerates the reference. For image.Image formats, a base64 encoded png representation is output to the testing log when a difference is identified.

(ExampleFunc func(), t *testing.T, filenames ...string)

Source from the content-addressed store, hash-verified

29// For image.Image formats, a base64 encoded png representation is output to
30// the testing log when a difference is identified.
31func CheckPlot(ExampleFunc func(), t *testing.T, filenames ...string) {
32 t.Helper()
33
34 CheckPlotApprox(ExampleFunc, t, 0, filenames...)
35}
36
37// CheckPlotApprox checks a generated plot against a previously created reference.
38// The normalized delta parameter describes how tight the matching should be

Callers 15

TestDrawGlyphBoxesFunction · 0.92
TestAlignFunction · 0.92
TestAxisLabelsFunction · 0.92
TestLegend_standaloneFunction · 0.92
TestAxisPaddingFunction · 0.92
TestFieldFunction · 0.92
TestFieldColorsFunction · 0.92
TestFieldGophersFunction · 0.92
TestErrorsFunction · 0.92
TestTimeSeriesFunction · 0.92
TestColorBar_horizontalFunction · 0.92

Calls 1

CheckPlotApproxFunction · 0.85

Tested by 15

TestDrawGlyphBoxesFunction · 0.74
TestAlignFunction · 0.74
TestAxisLabelsFunction · 0.74
TestLegend_standaloneFunction · 0.74
TestAxisPaddingFunction · 0.74
TestFieldFunction · 0.74
TestFieldColorsFunction · 0.74
TestFieldGophersFunction · 0.74
TestErrorsFunction · 0.74
TestTimeSeriesFunction · 0.74
TestColorBar_horizontalFunction · 0.74