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

Method Ticks

axis.go:648–668  ·  view source on GitHub ↗

Ticks implements plot.Ticker.

(min, max float64)

Source from the content-addressed store, hash-verified

646
647// Ticks implements plot.Ticker.
648func (t TimeTicks) Ticks(min, max float64) []Tick {
649 if t.Ticker == nil {
650 t.Ticker = DefaultTicks{}
651 }
652 if t.Format == "" {
653 t.Format = time.RFC3339
654 }
655 if t.Time == nil {
656 t.Time = UTCUnixTime
657 }
658
659 ticks := t.Ticker.Ticks(min, max)
660 for i := range ticks {
661 tick := &ticks[i]
662 if tick.Label == "" {
663 continue
664 }
665 tick.Label = t.Time(tick.Value).Format(t.Format)
666 }
667 return ticks
668}
669
670// A Tick is a single tick mark on an axis.
671type Tick struct {

Callers

nothing calls this directly

Calls 1

TicksMethod · 0.65

Tested by

no test coverage detected