MCPcopy Create free account
hub / github.com/cogentcore/core / defaults

Method defaults

plot/plotcore/options.go:82–94  ·  view source on GitHub ↗

defaults sets defaults if unset values are present.

()

Source from the content-addressed store, hash-verified

80
81// defaults sets defaults if unset values are present.
82func (po *PlotOptions) defaults() {
83 if po.LineWidth == 0 {
84 po.LineWidth = 1
85 po.Lines = true
86 po.Points = false
87 po.PointSize = 3
88 po.BarWidth = .8
89 po.LegendPosition.Defaults()
90 }
91 if po.Scale == 0 {
92 po.Scale = 1
93 }
94}
95
96// fromMeta sets plot options from meta data.
97func (po *PlotOptions) fromMeta(dt *table.Table) {

Callers 1

InitMethod · 0.45

Calls 1

DefaultsMethod · 0.65

Tested by

no test coverage detected