plot

package
v0.0.55 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2020 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AxisTime = -1
	AxisNum  = -2
	AxisAuto = -3

	DefaultWidth  = 20 * vg.Centimeter
	DefaultHeight = DefaultWidth

	ScatterPlot = Type(iota)
	LinePlot
	LinePointPlot
	ClusterPlot
	BoxPlot
	InvalidPlotType
)

Variables

This section is empty.

Functions

func Dir

func Dir(useLocal bool, name string) http.FileSystem

Dir returns a http.Filesystem for the embedded assets on a given prefix dir. If useLocal is true, the filesystem's contents are instead used.

func FS

func FS(useLocal bool) http.FileSystem

FS returns a http.Filesystem for the embedded assets. If useLocal is true, the filesystem's contents are instead used.

func FSByte

func FSByte(useLocal bool, name string) ([]byte, error)

FSByte returns the named file from the embedded assets. If useLocal is true, the filesystem's contents are instead used.

func FSMustByte

func FSMustByte(useLocal bool, name string) []byte

FSMustByte is the same as FSByte, but panics if name is not present.

func FSMustString

func FSMustString(useLocal bool, name string) string

FSMustString is the string version of FSMustByte.

func FSString

func FSString(useLocal bool, name string) (string, error)

FSString is the string version of FSByte.

func RegisterHttpPlotter

func RegisterHttpPlotter(b reg.ProcessorRegistry)

func RegisterPlot

func RegisterPlot(b reg.ProcessorRegistry)

Types

type ColorGenerator

type ColorGenerator struct {
	// contains filtered or unexported fields
}

func NewColorGenerator

func NewColorGenerator(numColors int) (*ColorGenerator, error)

func (*ColorGenerator) Next

func (g *ColorGenerator) Next() color.Color

type DashesGenerator

type DashesGenerator struct {
	// contains filtered or unexported fields
}

func NewDashesGenerator

func NewDashesGenerator() *DashesGenerator

func (*DashesGenerator) Next

func (g *DashesGenerator) Next() []vg.Length

type GlyphGenerator

type GlyphGenerator struct {
	// contains filtered or unexported fields
}

func NewGlyphGenerator

func NewGlyphGenerator() *GlyphGenerator

func (*GlyphGenerator) Next

func (g *GlyphGenerator) Next() draw.GlyphDrawer

type HttpPlotter

type HttpPlotter struct {
	bitflow.NoopProcessor

	Endpoint       string
	WindowSize     int
	UseLocalStatic bool
	// contains filtered or unexported fields
}

func NewHttpPlotter

func NewHttpPlotter(endpoint string, windowSize int, useLocalStatic bool) *HttpPlotter

func (*HttpPlotter) Sample

func (p *HttpPlotter) Sample(sample *bitflow.Sample, header *bitflow.Header) error

func (*HttpPlotter) Start

func (p *HttpPlotter) Start(wg *sync.WaitGroup) golib.StopChan

func (*HttpPlotter) String

func (p *HttpPlotter) String() string

type Plot

type Plot struct {
	LabelX, LabelY string
	Type           Type
	NoLegend       bool
}

type Processor added in v0.0.34

type Processor struct {
	bitflow.NoopProcessor

	Type            Type
	NoLegend        bool
	AxisX           int
	AxisY           int
	RadiusDimension int
	OutputFile      string
	ColorTag        string
	SeparatePlots   bool // If true, every ColorTag value will create a new plot

	// If not nil, will override the automatically suggested bounds for the respective axis
	ForceXmin *float64
	ForceXmax *float64
	ForceYmin *float64
	ForceYmax *float64
	// contains filtered or unexported fields
}

func (*Processor) Close added in v0.0.34

func (p *Processor) Close()

func (*Processor) Sample added in v0.0.34

func (p *Processor) Sample(sample *bitflow.Sample, header *bitflow.Header) error

func (*Processor) Start added in v0.0.34

func (p *Processor) Start(wg *sync.WaitGroup) golib.StopChan

func (*Processor) String added in v0.0.34

func (p *Processor) String() string

type ShapeGenerator added in v0.0.34

type ShapeGenerator struct {
	Colors *ColorGenerator
	Glyphs *GlyphGenerator
	Dashes *DashesGenerator
}

func NewPlotShapeGenerator

func NewPlotShapeGenerator(numColors int) (*ShapeGenerator, error)

type Type added in v0.0.34

type Type uint

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL