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

Method SetColumnOptions

plot/plotcore/ploteditor.go:179–195  ·  view source on GitHub ↗

SetColumnOptions sets the main parameters for one column.

(column string, on bool, fixMin bool, min float32, fixMax bool, max float32)

Source from the content-addressed store, hash-verified

177
178// SetColumnOptions sets the main parameters for one column.
179func (pl *PlotEditor) SetColumnOptions(column string, on bool, fixMin bool, min float32, fixMax bool, max float32) *ColumnOptions {
180 co := pl.ColumnOptions(column)
181 if co == nil {
182 slog.Error("plotcore.PlotEditor.SetColumnOptions: column not found", "column", column)
183 return nil
184 }
185 co.On = on
186 co.Range.FixMin = fixMin
187 if fixMin {
188 co.Range.Min = min
189 }
190 co.Range.FixMax = fixMax
191 if fixMax {
192 co.Range.Max = max
193 }
194 return co
195}
196
197// SaveSVG saves the plot to an svg -- first updates to ensure that plot is current
198func (pl *PlotEditor) SaveSVG(fname core.Filename) { //types:add

Callers

nothing calls this directly

Calls 2

ColumnOptionsMethod · 0.95
ErrorMethod · 0.65

Tested by

no test coverage detected