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

Function randomPoints

gob/gob_test.go:110–121  ·  view source on GitHub ↗

randomPoints returns some random x, y points.

(n int, rnd *rand.Rand)

Source from the content-addressed store, hash-verified

108
109// randomPoints returns some random x, y points.
110func randomPoints(n int, rnd *rand.Rand) plotter.XYs {
111 pts := make(plotter.XYs, n)
112 for i := range pts {
113 if i == 0 {
114 pts[i].X = rnd.Float64()
115 } else {
116 pts[i].X = pts[i-1].X + rnd.Float64()
117 }
118 pts[i].Y = pts[i].X + rnd.Float64()*1e4
119 }
120 return pts
121}
122
123// CommaTicks computes the default tick marks, but inserts commas
124// into the labels for the major tick marks.

Callers 7

ExampleErrorsFunction · 0.85
ExampleScatterFunction · 0.85
ExampleLine_stepLineFunction · 0.85
Example_timeSeriesFunction · 0.85
clippedFilledLineFunction · 0.85
ExampleLine_filledLineFunction · 0.85
TestPersistencyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected