NewSubPlot returns a [PlotEditor] with its own separate [core.Toolbar], suitable for a tab or other element that is not the main plot.
(parent ...tree.Node)
| 76 | // NewSubPlot returns a [PlotEditor] with its own separate [core.Toolbar], |
| 77 | // suitable for a tab or other element that is not the main plot. |
| 78 | func NewSubPlot(parent ...tree.Node) *PlotEditor { |
| 79 | fr := core.NewFrame(parent...) |
| 80 | tb := core.NewToolbar(fr) |
| 81 | pl := NewPlotEditor(fr) |
| 82 | fr.Styler(func(s *styles.Style) { |
| 83 | s.Direction = styles.Column |
| 84 | s.Grow.Set(1, 1) |
| 85 | }) |
| 86 | tb.Maker(pl.MakeToolbar) |
| 87 | return pl |
| 88 | } |
| 89 | |
| 90 | func (pl *PlotEditor) Init() { |
| 91 | pl.Frame.Init() |
nothing calls this directly
no test coverage detected