plotters

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func XYZHeatmap

func XYZHeatmap(w io.Writer, data plotter.XYZer, config XYZConfig, rows, cols int) (int64, error)

func XYZScatter

func XYZScatter(w io.Writer, data plotter.XYZer, config XYZConfig) (int64, error)

Types

type Grid

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

A Grid groups the data of a plotter.XYZer in a plotter.GridXYZ, so it can be displayed as a Heat Map. For each cell, Z returns the *average* value.

func (Grid) Dims

func (g Grid) Dims() (c, r int)

func (Grid) X

func (g Grid) X(c int) float64

func (Grid) Y

func (g Grid) Y(r int) float64

func (Grid) Z

func (g Grid) Z(c, r int) float64

type Sampler

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

A Sampler collects samples to determine the median, average, min and max.

func (*Sampler) Add

func (m *Sampler) Add(value ...float64)

func (*Sampler) Average

func (m *Sampler) Average() float64

func (*Sampler) Len

func (m *Sampler) Len() int

func (*Sampler) Max

func (m *Sampler) Max() float64

func (*Sampler) Median

func (m *Sampler) Median() float64

func (*Sampler) Min

func (m *Sampler) Min() float64

func (*Sampler) Reset

func (m *Sampler) Reset()

type XYZConfig

type XYZConfig struct {
	ColorMap palette.ColorMap
	Title    string
	X        string
	XTicker  string
	Y        string
	Ranges   []float64
	Width    float64
	Height   float64
}

Jump to

Keyboard shortcuts

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