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.
()
| 290 | // It does not automatically update the [table.IndexView] unless it is |
| 291 | // nil or out date. |
| 292 | func (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 |
no test coverage detected