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

Function newTableXY

plot/plotcore/tablexy.go:55–58  ·  view source on GitHub ↗

newTableXY returns a new XY plot view onto the given IndexView of table.Table (makes a copy), from given column indexes, and tensor indexes within each cell. Column indexes are enforced to be valid, with an error message if they are not.

(dt *table.IndexView, xcol, xtsrIndex, ycol, ytsrIndex int, yrng minmax.Range32)

Source from the content-addressed store, hash-verified

53// from given column indexes, and tensor indexes within each cell.
54// Column indexes are enforced to be valid, with an error message if they are not.
55func newTableXY(dt *table.IndexView, xcol, xtsrIndex, ycol, ytsrIndex int, yrng minmax.Range32) (*tableXY, error) {
56 txy := &tableXY{table: dt.Clone(), xColumn: xcol, yColumn: ycol, xIndex: xtsrIndex, yIndex: ytsrIndex, yRange: yrng}
57 return txy, txy.validate()
58}
59
60// newTableXYName returns a new XY plot view onto the given IndexView of table.Table (makes a copy),
61// from given column name and tensor indexes within each cell.

Callers 1

genPlotBarMethod · 0.85

Calls 2

validateMethod · 0.95
CloneMethod · 0.65

Tested by

no test coverage detected