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

Method Add

plot/plot.go:100–106  ·  view source on GitHub ↗

Add adds a Plotters to the plot. If the plotters implements DataRanger then the minimum and maximum values of the X and Y axes are changed if necessary to fit the range of the data. When drawing the plot, Plotters are drawn in the order in which they were added to the plot.

(ps ...Plotter)

Source from the content-addressed store, hash-verified

98// When drawing the plot, Plotters are drawn in the
99// order in which they were added to the plot.
100func (pt *Plot) Add(ps ...Plotter) {
101 for _, d := range ps {
102 pt.UpdateRangeFromPlotter(d)
103 }
104
105 pt.Plotters = append(pt.Plotters, ps...)
106}
107
108// SetPixels sets the backing pixels image to given image.RGBA
109func (pt *Plot) SetPixels(img *image.RGBA) {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected