Documentation ¶
Overview ¶
package DataVisual provides default plotting windows and functions for go. Uses a X11 binding in order to provide window handling which limits to X11 compatible systems.
Index ¶
- func CloseAllPlots()
- func WaitForAllPlotsClosed()
- type DVSystem
- type PlotWindow
- func (plot *PlotWindow) Close()
- func (plot *PlotWindow) DrawPoint(x, y int, pixelColor color.Color)
- func (plot *PlotWindow) DrawPoints(points []image.Point, pixelColor color.Color)
- func (plot *PlotWindow) SetTitle(Title string)
- func (plot *PlotWindow) WaitForClosed()
- func (plot *PlotWindow) WindowHeight() int
- func (plot *PlotWindow) WindowWidth() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseAllPlots ¶
func CloseAllPlots()
func WaitForAllPlotsClosed ¶
func WaitForAllPlotsClosed()
Types ¶
type DVSystem ¶
func Initialize ¶
DVSystem uses the (scary!) package global singleton system variable. Normally we won't be creating a DVSystem since we want to just single line create static or dynamic plots. But incase someone needs to fiddle with the internal DataVisual X11 binding components this will allow them to create as they need it instead of whenever the first plot is created.
type PlotWindow ¶
type PlotWindow struct {
// contains filtered or unexported fields
}
func NewPlotWindow ¶
func NewPlotWindow(width, height int, title string) (*PlotWindow, error)
Creates and displays a new plot window. Defaults to an all white background with the upper left corner at (0,0). If title is "" then the title will be an auto incrementing "Figure - #"
func (*PlotWindow) Close ¶
func (plot *PlotWindow) Close()
Tells the DVSystem to remove this plot (which closes it) and lets it handle the cases of waiting for all plots to close and sending the per plot close message and the all plot closed message.
func (*PlotWindow) DrawPoint ¶
func (plot *PlotWindow) DrawPoint(x, y int, pixelColor color.Color)
Draws a single point on the window in the window (rather then plot) coordinate system. This routine is slow because it is essentially performing a buffer flip for each point.
This routine should be avoided. This is here as an assistance function rather then the intended routine to be used for plotting. Prefer the 'Plot' data functions over this function in almost all circumstances.
func (*PlotWindow) DrawPoints ¶
func (plot *PlotWindow) DrawPoints(points []image.Point, pixelColor color.Color)
Draws a array of points on the window in the window (rather then plot) coordinate system. This routine is faster then the single point system because it performs only one buffer flip per Point array rather then per point.
This routine should be avoided. This is here as an assistance function rather then the intended routine to be used for plotting. Prefer the 'Plot' data functions over this function in almost all circumstances.
func (*PlotWindow) WaitForClosed ¶
func (plot *PlotWindow) WaitForClosed()
If the window exists it waits on the closed channel until it receives anything. This is simply a wait/signal system but it should be true simply for the sake of consistancy.
func (*PlotWindow) WindowHeight ¶
func (plot *PlotWindow) WindowHeight() int
The height of the plot window. This is the height of the UI Window.
func (*PlotWindow) WindowWidth ¶
func (plot *PlotWindow) WindowWidth() int
The width of the plot window. This is the width of the UI Window.