plot

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package plot provides functions for creating SOM-related plots.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Heatmap

func Heatmap(title string, g 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 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 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 int) *RandomPalette

func (*RandomPalette) Colors

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

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)

Jump to

Keyboard shortcuts

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