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

Function tickLabelHeight

axis.go:698–711  ·  view source on GitHub ↗

tickLabelHeight returns height of the tick mark labels.

(sty text.Style, ticks []Tick)

Source from the content-addressed store, hash-verified

696
697// tickLabelHeight returns height of the tick mark labels.
698func tickLabelHeight(sty text.Style, ticks []Tick) vg.Length {
699 maxHeight := vg.Length(0)
700 for _, t := range ticks {
701 if t.IsMinor() {
702 continue
703 }
704 r := sty.Rectangle(t.Label)
705 h := r.Max.Y - r.Min.Y
706 if h > maxHeight {
707 maxHeight = h
708 }
709 }
710 return maxHeight
711}
712
713// tickLabelWidth returns the width of the widest tick mark label.
714func tickLabelWidth(sty text.Style, ticks []Tick) vg.Length {

Callers 3

sizeMethod · 0.85
drawMethod · 0.85
GlyphBoxesMethod · 0.85

Calls 2

IsMinorMethod · 0.80
RectangleMethod · 0.45

Tested by

no test coverage detected