plot

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package plot provides functions for creating SOM-related plots.

Index

Constants

This section is empty.

Variables

Functions

func Codes added in v0.2.0

func Codes(s *som.Som, columns [][2]int,
	boundariesLayer int,
	normalized bool, zeroAxis bool,
	plotType CodePlot, size image.Point) (image.Image, error)

func Heatmap

func Heatmap(title string, g plotter.GridXYZ, boundaries plotter.GridXYZ, width, height int, categories []string, labels []string, positions []plotter.XY) (image.Image, error)

func XY

func XY(
	title string, g plotter.XYer, size layer.Size, width, height int,
	categories []string, catIndices []int, drawGrid bool,
	data plotter.XYer, dataCats []string, dataIndices []int,
	dataLegend bool,
) (image.Image, error)

Types

type CodeBar added in v0.2.0

type CodeBar struct {
	Colors     []color.Color
	Horizontal bool
	AdjustAxis bool
}

func (*CodeBar) Plot added in v0.2.0

func (c *CodeBar) Plot(data []float64, dataRange Range) (*plot.Plot, []plot.Thumbnailer, error)

type CodeImage added in v0.2.0

type CodeImage struct {
	Rows int
}

func (*CodeImage) Plot added in v0.2.0

func (c *CodeImage) Plot(data []float64, dataRange Range) (*plot.Plot, []plot.Thumbnailer, error)

type CodeLines added in v0.2.0

type CodeLines struct {
	StepStyle  plotter.StepKind
	Vertical   bool
	AdjustAxis bool
}

func (*CodeLines) Plot added in v0.2.0

func (c *CodeLines) Plot(data []float64, dataRange Range) (*plot.Plot, []plot.Thumbnailer, error)

type CodePie added in v0.2.0

type CodePie struct {
	Colors []color.Color
}

func (*CodePie) Plot added in v0.2.0

func (c *CodePie) Plot(data []float64, dataRange Range) (*plot.Plot, []plot.Thumbnailer, error)

type CodePlot added in v0.2.0

type CodePlot interface {
	Plot(data []float64, dRange Range) (*plot.Plot, []plot.Thumbnailer, error)
}

type CodeRose added in v0.2.0

type CodeRose struct {
	Colors []color.Color
}

func (*CodeRose) Plot added in v0.2.0

func (c *CodeRose) Plot(data []float64, dataRange Range) (*plot.Plot, []plot.Thumbnailer, error)

type ConstantValues added in v0.2.0

type ConstantValues struct {
	Val    float64
	Length int
}

func (*ConstantValues) Len added in v0.2.0

func (vs *ConstantValues) Len() int

func (*ConstantValues) Value added in v0.2.0

func (vs *ConstantValues) Value(i int) float64

type FloatGrid

type FloatGrid struct {
	Size   layer.Size
	Values []float64
}

func (*FloatGrid) Dims

func (g *FloatGrid) Dims() (c, r int)

func (*FloatGrid) X

func (g *FloatGrid) X(c int) float64

func (*FloatGrid) Y

func (g *FloatGrid) Y(r int) float64

func (*FloatGrid) Z

func (g *FloatGrid) Z(c, r int) float64

type ImageGrid added in v0.2.0

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

func NewImageGrid added in v0.2.0

func NewImageGrid(data []float64, rows int) ImageGrid

func (*ImageGrid) Dims added in v0.2.0

func (g *ImageGrid) Dims() (int, int)

func (*ImageGrid) X added in v0.2.0

func (g *ImageGrid) X(c int) float64

func (*ImageGrid) Y added in v0.2.0

func (g *ImageGrid) Y(r int) float64

func (*ImageGrid) Z added in v0.2.0

func (g *ImageGrid) Z(c, r int) float64

type IntGrid

type IntGrid struct {
	Size   layer.Size
	Values []int
}

func (*IntGrid) Dims

func (g *IntGrid) Dims() (c, r int)

func (*IntGrid) X

func (g *IntGrid) X(c int) float64

func (*IntGrid) Y

func (g *IntGrid) Y(r int) float64

func (*IntGrid) Z

func (g *IntGrid) Z(c, r int) float64

type RandomPalette

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

func NewRandomPalette

func NewRandomPalette(cols []color.Color, count int) *RandomPalette

func (*RandomPalette) Colors

func (p *RandomPalette) Colors() []color.Color

type Range added in v0.2.0

type Range struct {
	Min, Max float64
}

type SimpleXY added in v0.2.0

type SimpleXY struct {
	Values   []float64
	Vertical bool
}

func (*SimpleXY) Len added in v0.2.0

func (s *SimpleXY) Len() int

func (*SimpleXY) XY added in v0.2.0

func (s *SimpleXY) XY(i int) (x, y float64)

type SomLayerGrid

type SomLayerGrid struct {
	Som    *som.Som
	Layer  int
	Column int
}

func (*SomLayerGrid) Dims

func (g *SomLayerGrid) Dims() (c, r int)

func (*SomLayerGrid) X

func (g *SomLayerGrid) X(c int) float64

func (*SomLayerGrid) Y

func (g *SomLayerGrid) Y(r int) float64

func (*SomLayerGrid) Z

func (g *SomLayerGrid) Z(c, r int) float64

type SomRowColXY

type SomRowColXY struct {
	Xy    plotter.XYer
	Size  layer.Size
	Index int
	IsRow bool
}

func (*SomRowColXY) Len

func (s *SomRowColXY) Len() int

func (*SomRowColXY) XY

func (s *SomRowColXY) XY(i int) (x, y float64)

type SomXY

type SomXY struct {
	Som     *som.Som
	XLayer  int
	XColumn int
	YLayer  int
	YColumn int
}

func (*SomXY) Len

func (s *SomXY) Len() int

func (*SomXY) XY

func (s *SomXY) XY(i int) (x, y float64)

type TableXY

type TableXY struct {
	XTable  *table.Table
	YTable  *table.Table
	XColumn int
	YColumn int
	XNorm   norm.Normalizer
	YNorm   norm.Normalizer
}

func (*TableXY) Len

func (t *TableXY) Len() int

func (*TableXY) XY

func (t *TableXY) XY(i int) (x, y float64)

type UMatrixGrid

type UMatrixGrid struct {
	UMatrix [][]float64
}

func (*UMatrixGrid) Dims

func (g *UMatrixGrid) Dims() (c, r int)

func (*UMatrixGrid) X

func (g *UMatrixGrid) X(c int) float64

func (*UMatrixGrid) Y

func (g *UMatrixGrid) Y(r int) float64

func (*UMatrixGrid) Z

func (g *UMatrixGrid) Z(c, r int) float64

type WhitePalette

type WhitePalette struct{}

func (*WhitePalette) Colors

func (p *WhitePalette) Colors() []color.Color

type ZeroSizeLabel

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

func (*ZeroSizeLabel) Plot

func (l *ZeroSizeLabel) Plot(c draw.Canvas, p *plot.Plot)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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