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

Struct tableXY

plot/plotcore/tablexy.go:23–45  ·  view source on GitHub ↗

tableXY selects two columns from a [table.Table] data table to plot in a [plot.Plot], satisfying the [plot.XYer], [plot.Valuer], [plot.Labeler], and [plots.YErrorer] interfaces. For Tensor-valued cells, Index's specify tensor cell. Also satisfies the plot/plots.Labeler interface for labels attached

Source from the content-addressed store, hash-verified

21// Also satisfies the plot/plots.Labeler interface for labels attached to a line, and
22// plot/plots.YErrorer for error bars.
23type tableXY struct {
24
25 // the index view of data table to plot from
26 table *table.IndexView
27
28 // the indexes of the tensor columns to use for the X and Y data, respectively
29 xColumn, yColumn int
30
31 // numer of elements in each row of data -- 1 for scalar, > 1 for multi-dimensional
32 xRowSize, yRowSize int
33
34 // the indexes of the element within each tensor cell if cells are n-dimensional, respectively
35 xIndex, yIndex int
36
37 // the column to use for returning a label using Label interface -- for string cols
38 labelColumn int
39
40 // the column to use for returning errorbars (+/- given value) -- if YColumn is tensor then this must also be a tensor and given YIndex used
41 errColumn int
42
43 // range constraints on Y values
44 yRange minmax.Range32
45}
46
47var _ plot.XYer = &tableXY{}
48var _ plot.Valuer = &tableXY{}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected