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

Method NominalY

plot.go:480–490  ·  view source on GitHub ↗

NominalY is like NominalX, but for the Y axis.

(names ...string)

Source from the content-addressed store, hash-verified

478
479// NominalY is like NominalX, but for the Y axis.
480func (p *Plot) NominalY(names ...string) {
481 p.Y.Tick.Width = 0
482 p.Y.Tick.Length = 0
483 p.Y.Width = 0
484 p.X.Padding = p.Y.Tick.Label.Height(names[0]) / 2
485 ticks := make([]Tick, len(names))
486 for i, name := range names {
487 ticks[i] = Tick{float64(i), name}
488 }
489 p.Y.Tick.Marker = ConstantTicks(ticks)
490}
491
492// WriterTo returns an io.WriterTo that will write the plot as
493// the specified image format.

Callers 4

ExampleBoxPlotFunction · 0.80
ExampleQuartPlotFunction · 0.80
ExampleBarChartFunction · 0.80

Calls 2

ConstantTicksTypeAlias · 0.85
HeightMethod · 0.80

Tested by 4

ExampleBoxPlotFunction · 0.64
ExampleQuartPlotFunction · 0.64
ExampleBarChartFunction · 0.64