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

Function SplitVertical

vg/draw/split_vertical_test.go:15–17  ·  view source on GitHub ↗

SplitVertical returns the lower and upper portions of c after splitting it along a horizontal line distance y from the bottom of c.

(c draw.Canvas, y vg.Length)

Source from the content-addressed store, hash-verified

13// splitting it along a horizontal line distance y from the
14// bottom of c.
15func SplitVertical(c draw.Canvas, y vg.Length) (lower, upper draw.Canvas) {
16 return draw.Crop(c, 0, 0, 0, c.Min.Y-c.Max.Y+y), draw.Crop(c, 0, 0, y, 0)
17}

Callers 1

Calls 1

CropFunction · 0.92

Tested by

no test coverage detected