MCPcopy Create free account
hub / github.com/cogentcore/core / UpdateRange

Method UpdateRange

plot/plot.go:189–197  ·  view source on GitHub ↗

UpdateRange updates the axis range values based on current Plot values. This first resets the range so any fixed additional range values should be set after this point.

()

Source from the content-addressed store, hash-verified

187// This first resets the range so any fixed additional range values should
188// be set after this point.
189func (pt *Plot) UpdateRange() {
190 pt.X.Min = math32.Inf(+1)
191 pt.X.Max = math32.Inf(-1)
192 pt.Y.Min = math32.Inf(+1)
193 pt.Y.Max = math32.Inf(-1)
194 for _, d := range pt.Plotters {
195 pt.UpdateRangeFromPlotter(d)
196 }
197}
198
199func (pt *Plot) UpdateRangeFromPlotter(d Plotter) {
200 if x, ok := d.(DataRanger); ok {

Callers 1

TestBarChartErrFunction · 0.45

Calls 2

InfFunction · 0.92

Tested by 1

TestBarChartErrFunction · 0.36