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

Method UpdatePlot

plot/plotcore/ploteditor.go:292–306  ·  view source on GitHub ↗

UpdatePlot updates the display based on current IndexView into table. It does not automatically update the [table.IndexView] unless it is nil or out date.

()

Source from the content-addressed store, hash-verified

290// It does not automatically update the [table.IndexView] unless it is
291// nil or out date.
292func (pl *PlotEditor) UpdatePlot() {
293 if pl == nil || pl.This == nil {
294 return
295 }
296 if pl.table == nil || pl.table.Table == nil || pl.inPlot {
297 return
298 }
299 if len(pl.Children) != 2 || len(pl.Columns) != pl.table.Table.NumColumns() {
300 pl.Update()
301 }
302 if pl.table.Len() == 0 {
303 pl.table.Sequential()
304 }
305 pl.genPlot()
306}
307
308// genPlot generates the plot and renders it to SVG
309// It surrounds operation with InPlot true / false to prevent multiple updates

Callers 10

InitMethod · 0.95
SaveSVGMethod · 0.95
SavePNGMethod · 0.95
OpenCSVMethod · 0.95
OpenFSMethod · 0.95
setAllColumnsMethod · 0.95
setColumnsByNameMethod · 0.95
makeColumnsMethod · 0.95
MakeToolbarMethod · 0.95
SizeFinalMethod · 0.95

Calls 5

genPlotMethod · 0.95
SequentialMethod · 0.80
NumColumnsMethod · 0.65
UpdateMethod · 0.65
LenMethod · 0.65

Tested by

no test coverage detected