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

Method Ticks

gob/gob_test.go:127–136  ·  view source on GitHub ↗
(min, max float64)

Source from the content-addressed store, hash-verified

125type commaTicks struct{}
126
127func (commaTicks) Ticks(min, max float64) []plot.Tick {
128 tks := plot.DefaultTicks{}.Ticks(min, max)
129 for i, t := range tks {
130 if t.Label == "" { // Skip minor ticks, they are fine.
131 continue
132 }
133 tks[i].Label = addCommas(t.Label)
134 }
135 return tks
136}
137
138// AddCommas adds commas after every 3 characters from right to left.
139// NOTE: This function is a quick hack, it doesn't work with decimal

Callers

nothing calls this directly

Calls 2

addCommasFunction · 0.85
TicksMethod · 0.65

Tested by

no test coverage detected