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

Method DataRange

plotter/errbars.go:197–209  ·  view source on GitHub ↗

DataRange implements the plot.DataRanger interface.

()

Source from the content-addressed store, hash-verified

195
196// DataRange implements the plot.DataRanger interface.
197func (e *XErrorBars) DataRange() (xmin, xmax, ymin, ymax float64) {
198 ymin, ymax = Range(YValues{e})
199 xmin = math.Inf(1)
200 xmax = math.Inf(-1)
201 for i, err := range e.XErrors {
202 x := e.XYs[i].X
203 xlow := x - math.Abs(err.Low)
204 xhigh := x + math.Abs(err.High)
205 xmin = math.Min(math.Min(math.Min(xmin, x), xlow), xhigh)
206 xmax = math.Max(math.Max(math.Max(xmax, x), xlow), xhigh)
207 }
208 return
209}
210
211// GlyphBoxes implements the plot.GlyphBoxer interface.
212func (e *XErrorBars) GlyphBoxes(plt *plot.Plot) []plot.GlyphBox {

Callers

nothing calls this directly

Calls 3

RangeFunction · 0.85
MinMethod · 0.65
MaxMethod · 0.65

Tested by

no test coverage detected