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

Method DataRange

plotter/errbars.go:89–101  ·  view source on GitHub ↗

DataRange implements the plot.DataRanger interface.

()

Source from the content-addressed store, hash-verified

87
88// DataRange implements the plot.DataRanger interface.
89func (e *YErrorBars) DataRange() (xmin, xmax, ymin, ymax float64) {
90 xmin, xmax = Range(XValues{e})
91 ymin = math.Inf(1)
92 ymax = math.Inf(-1)
93 for i, err := range e.YErrors {
94 y := e.XYs[i].Y
95 ylow := y - math.Abs(err.Low)
96 yhigh := y + math.Abs(err.High)
97 ymin = math.Min(math.Min(math.Min(ymin, y), ylow), yhigh)
98 ymax = math.Max(math.Max(math.Max(ymax, y), ylow), yhigh)
99 }
100 return
101}
102
103// GlyphBoxes implements the plot.GlyphBoxer interface.
104func (e *YErrorBars) 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