Documentation ¶
Overview ¶
Package qml implements a GUI interface and plotting functions using the go QML bindings.
Index ¶
- Variables
- func Color(i int) color.RGBA
- func MainLoop(ctrl *Ctrl)
- type Axis
- type Config
- type Ctrl
- type Event
- type Font
- type Histogram
- func (pt Histogram) DataRange() (min, max Point)
- func (pt Histogram) DrawLegend(gl *GL.GL, ps *Plots)
- func (pt Histogram) LegendSize(ps *Plots) (w, h float32)
- func (h *Histogram) Plot(gl *GL.GL, p *Plot)
- func (h *Histogram) Refresh()
- func (h *Histogram) Scaled() bool
- func (pt Histogram) SetColor(c color.RGBA)
- func (pt Histogram) SetName(n string)
- type Line
- func (pt Line) DataRange() (min, max Point)
- func (pt Line) DrawLegend(gl *GL.GL, ps *Plots)
- func (pt Line) LegendSize(ps *Plots) (w, h float32)
- func (l *Line) Plot(gl *GL.GL, p *Plot)
- func (l *Line) Refresh()
- func (pt Line) Scaled() bool
- func (pt Line) SetColor(c color.RGBA)
- func (pt Line) SetName(n string)
- type Network
- type Plot
- type Plots
- type Plotter
- type Point
- type Points
- func (pt Points) DataRange() (min, max Point)
- func (pt Points) DrawLegend(gl *GL.GL, ps *Plots)
- func (pt Points) LegendSize(ps *Plots) (w, h float32)
- func (d *Points) Plot(gl *GL.GL, p *Plot)
- func (d *Points) Refresh()
- func (pt Points) Scaled() bool
- func (pt Points) SetColor(c color.RGBA)
- func (pt Points) SetName(n string)
- type Position
- type XYer
Constants ¶
This section is empty.
Variables ¶
var ( DefaultFontName = "NimbusSanL-Bold" DefaultFontScale = 14 )
var DefaultColors = []color.RGBA{
rgb(255, 255, 0),
rgb(0, 255, 255),
rgb(255, 105, 180),
rgb(0, 255, 0),
rgb(0, 0, 255),
rgb(255, 0, 0),
rgb(255, 0, 255),
}
Functions ¶
Types ¶
type Config ¶
type Config struct { Model string // contains filtered or unexported fields }
Config type manages updating the config settings
type Ctrl ¶
Ctrl type is used for communication with the gui
type Font ¶
type Font struct {
// contains filtered or unexported fields
}
A Font allows rendering of text to an OpenGL context.
type Histogram ¶
type Histogram struct { Fill bool // contains filtered or unexported fields }
Histogram plotter represents a histogram plot.
func NewHistogram ¶
NewHistogram function creates a histogram plot with the given data
func (Histogram) DataRange ¶
func (pt Histogram) DataRange() (min, max Point)
DataRange method gives the x and y range
func (Histogram) DrawLegend ¶
func (pt Histogram) DrawLegend(gl *GL.GL, ps *Plots)
DrawLegend method draws the legend at the current screen position.
func (Histogram) LegendSize ¶
LegendSize method returns the size of the legend on screen.
type Line ¶
type Line struct { Width float32 // contains filtered or unexported fields }
Line plotter represents a line plot.
func (Line) DataRange ¶
func (pt Line) DataRange() (min, max Point)
DataRange method gives the x and y range
func (Line) DrawLegend ¶
func (pt Line) DrawLegend(gl *GL.GL, ps *Plots)
DrawLegend method draws the legend at the current screen position.
func (Line) LegendSize ¶
LegendSize method returns the size of the legend on screen.
type Network ¶
type Network struct { qml.Object Background color.RGBA Color color.RGBA // contains filtered or unexported fields }
Network type is used to visualise the neural net.
type Plot ¶
type Plot struct { Name string Title string Xaxis *Axis Yaxis *Axis Legend Position Plotters []Plotter }
Plot type represents one of the plots
type Plots ¶
type Plots struct { qml.Object Grid bool Background color.RGBA Color color.RGBA GridColor color.RGBA // contains filtered or unexported fields }
Plots type is a QML plotting component.
func (*Plots) TextHeight ¶
returns height of the current font in model coords
type Plotter ¶
type Plotter interface { Refresh() Plot(gl *GL.GL, p *Plot) LegendSize(ps *Plots) (x, y float32) DrawLegend(gl *GL.GL, ps *Plots) DataRange() (min, max Point) SetColor(c color.RGBA) SetName(n string) Scaled() bool }
Plotter interface type is a plottable data set.
type Points ¶
Points plotter represents an xy scatter plot
func (Points) DataRange ¶
func (pt Points) DataRange() (min, max Point)
DataRange method gives the x and y range
func (Points) DrawLegend ¶
func (pt Points) DrawLegend(gl *GL.GL, ps *Plots)
DrawLegend method draws the legend at the current screen position.
func (Points) LegendSize ¶
LegendSize method returns the size of the legend on screen.