plotter

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Axis

type Axis struct {
	Label      string
	TimeFormat string
}

type BasePlotter

type BasePlotter struct {
	Title    string
	AxisX    Axis
	AxisY    Axis
	Size     Size
	ColorMap palette.ColorMap
	Fold     bool
}

type ContourPlotter

type ContourPlotter struct {
	GriddedPlotter
}

func (ContourPlotter) Plot

func (c ContourPlotter) Plot(measurements []store.Measurement) (*vgimg.PngCanvas, error)

type GriddedPlotter

type GriddedPlotter struct {
	BasePlotter
	XResolution int
	YResolution int
	XRange      *Range
	YRange      *Range
	Ranges      []float64
}

type HeatmapPlotter

type HeatmapPlotter struct {
	GriddedPlotter
}

func (HeatmapPlotter) Plot

func (h HeatmapPlotter) Plot(measurements []store.Measurement) (*vgimg.PngCanvas, error)

type Legend

type Legend struct {
	Increase int
}

type Plotter

type Plotter interface {
	Plot(measurement []store.Measurement) (*vgimg.PngCanvas, error)
}

type Range

type Range struct {
	Min float64
	Max float64
	// contains filtered or unexported fields
}

func NewRange

func NewRange(min, max float64) *Range

func (*Range) Bound

func (r *Range) Bound() bool

func (*Range) GetIntervals

func (r *Range) GetIntervals(steps int) []float64

func (*Range) Process

func (r *Range) Process(value float64)

type Sampler

type Sampler struct {
	Fold bool
	// contains filtered or unexported fields
}

func Sample

func Sample(measurements []store.Measurement, fold bool, xResolution, yResolution int, xRange, yRange *Range) *Sampler

func (*Sampler) Dims

func (s *Sampler) Dims() (c, r int)

func (*Sampler) X

func (s *Sampler) X(c int) float64

func (*Sampler) Y

func (s *Sampler) Y(r int) float64

func (*Sampler) Z

func (s *Sampler) Z(c, r int) float64

type ScatterPlotter

type ScatterPlotter struct {
	BasePlotter
	Legend Legend
}

func (ScatterPlotter) Plot

func (s ScatterPlotter) Plot(measurement []store.Measurement) (*vgimg.PngCanvas, error)

type Size

type Size struct {
	Width  int
	Height int
}

Jump to

Keyboard shortcuts

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