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

Method lengthOffset

axis.go:690–695  ·  view source on GitHub ↗

lengthOffset returns an offset that should be added to the tick mark's line to accout for its length. I.e., the start of the line for a minor tick mark must be shifted by half of the length.

(len vg.Length)

Source from the content-addressed store, hash-verified

688// the line for a minor tick mark must be shifted by half of
689// the length.
690func (t Tick) lengthOffset(len vg.Length) vg.Length {
691 if t.IsMinor() {
692 return len / 2
693 }
694 return 0
695}
696
697// tickLabelHeight returns height of the tick mark labels.
698func tickLabelHeight(sty text.Style, ticks []Tick) vg.Length {

Callers 2

drawMethod · 0.80
drawMethod · 0.80

Calls 1

IsMinorMethod · 0.95

Tested by

no test coverage detected