plt

package
v0.0.0-...-21417f8 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TxtInvalidDataRange = "INVALID DATA RANGE"
	TxtNoData           = "NO DATA"
)
View Source
const (
	AxisTrnc = unt.Unt(4)
	LenMin   = float32(10)
)

Variables

View Source
var (
	Scl          = flt.Flt(1.0)
	StkWidth     = unt.Unt(1)
	ShpRadius    = unt.Unt(10)
	AxisPad      = unt.Unt(10)
	BarPad       = unt.Unt(10)
	Len          = unt.Unt(100)
	Pad          = unt.Unt(10)
	Mrgn         = vis.NewLenXY(2, 2, 2, 2)
	BakClr       = clr.Clr{R: 0x0, G: 0x0, B: 0x0, A: 0xff}
	BrdrClr      = clr.Clr{R: 0x61, G: 0x61, B: 0x61, A: 0xff}
	BrdrLen      = unt.Unt(1)
	InrvlTxtLen  = unt.Unt(50)
	InrvlTxtClrX = clr.Clr{R: 0x61, G: 0x61, B: 0x61, A: 0xff}
	InrvlTxtClrY = clr.Clr{R: 0xe0, G: 0xe0, B: 0xe0, A: 0xff}
	InrvlFnt     = roboto.Medium(12)
	MsgClr       = clr.Clr{R: 0x37, G: 0x47, B: 0x4f, A: 0xff}
	MsgFnt       = roboto.Medium(24)
	TitleClr     = clr.Clr{R: 0x9e, G: 0x9e, B: 0x9e, A: 0xff}
	TitleFnt     = roboto.Medium(14)
	PrfClr       = clr.Green500
	LosClr       = clr.Red500
	PrfPen       = pen.Green500
	LosPen       = pen.Red500
	OutlierLim   = flt.Flt(12.0)
)
View Source
var (
	Siz = vis.Siz{Width: 2560, Height: 1440}
)

Functions

func PltMeasurePll

func PltMeasurePll(vs ...Plt) (r []vis.Siz)

func PltRndrPll

func PltRndrPll(vs ...Plt)

Types

type CndStk

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

type CndStkRndrSeg

type CndStkRndrSeg struct {
	*CndStk
	vis.Stk
	// contains filtered or unexported fields
}

func (*CndStkRndrSeg) Act

func (x *CndStkRndrSeg) Act()

type Dpth

type Dpth struct {
	PltBse
	Plts *Plts
}

func NewDpth

func NewDpth(vs ...Plt) (r *Dpth)

func (*Dpth) Draw

func (x *Dpth) Draw(img *image.RGBA)

func (*Dpth) HrzScl

func (x *Dpth) HrzScl(v flt.Flt) Plt

func (*Dpth) Measure

func (x *Dpth) Measure() vis.Siz

func (*Dpth) Plt

func (x *Dpth) Plt(vs ...Plt) *Dpth

func (*Dpth) Rndr

func (x *Dpth) Rndr()

func (*Dpth) Scl

func (x *Dpth) Scl(v flt.Flt) Plt

func (*Dpth) Sho

func (x *Dpth) Sho() Plt

func (*Dpth) Siz

func (x *Dpth) Siz(w, h unt.Unt) Plt

func (*Dpth) VrtScl

func (x *Dpth) VrtScl(v flt.Flt) Plt

type DpthScp

type DpthScp struct {
	Idx uint32
	Arr []*Dpth
}

type FltAxisX

type FltAxisX struct {
	Width     uint32 // pixel width of values (not including any side length, border or margin)
	PxlPerVal float32
	Min       flt.Flt
	Max       flt.Flt
	Rng       flt.Flt
	Inrvls    []flt.Flt
	Lns       []flt.Flt
	Btm       SideFltAxisX
}

func NewFltAxisX

func NewFltAxisX() (r *FltAxisX)

func (*FltAxisX) MeasureInrvls

func (x *FltAxisX) MeasureInrvls(cnt unt.Unt)

func (*FltAxisX) Pxl

func (x *FltAxisX) Pxl(v flt.Flt) float32

type FltAxisY

type FltAxisY struct {
	Height    uint32
	PxlPerVal float32
	Min       flt.Flt
	Max       flt.Flt
	Rng       flt.Flt
	EqiDst    flt.Flt
	Inrvls    []flt.Flt
	Lns       []flt.Flt
	Rht       SideFltAxisY
	// contains filtered or unexported fields
}

func NewFltAxisY

func NewFltAxisY() (r *FltAxisY)

func (*FltAxisY) MeasureInrvls

func (x *FltAxisY) MeasureInrvls(cnt unt.Unt)

func (*FltAxisY) Pxl

func (x *FltAxisY) Pxl(v flt.Flt) float32

func (*FltAxisY) Vis

func (x *FltAxisY) Vis(v bol.Bol) *FltAxisY

type FltsSctr

type FltsSctr struct {
	PltBse
	XWidth  uint32
	Y       *FltAxisY
	Title   str.Str
	Outlier bol.Bol
	// contains filtered or unexported fields
}

func NewFltsSctr

func NewFltsSctr() (r *FltsSctr)

func (*FltsSctr) Draw

func (x *FltsSctr) Draw(img *image.RGBA)

func (*FltsSctr) Flts

func (x *FltsSctr) Flts(clr clr.Clr, vs ...*flts.Flts) *FltsSctr

func (*FltsSctr) HrzScl

func (x *FltsSctr) HrzScl(v flt.Flt) Plt

func (*FltsSctr) Measure

func (x *FltsSctr) Measure() vis.Siz

func (*FltsSctr) PrfLos

func (x *FltsSctr) PrfLos(prfs, loss *tmes.Tmes, stms ...hst.Stm) *FltsSctr

func (*FltsSctr) Rndr

func (x *FltsSctr) Rndr()

func (*FltsSctr) Scl

func (x *FltsSctr) Scl(v flt.Flt) Plt

func (*FltsSctr) Sho

func (x *FltsSctr) Sho() Plt

func (*FltsSctr) Siz

func (x *FltsSctr) Siz(w, h unt.Unt) Plt

func (*FltsSctr) VrtScl

func (x *FltsSctr) VrtScl(v flt.Flt) Plt

type FltsSctrDist

type FltsSctrDist struct {
	PltBse
	XWidth uint32
	Y      *FltAxisY
	// contains filtered or unexported fields
}

func NewFltsSctrDist

func NewFltsSctrDist() (r *FltsSctrDist)

func (*FltsSctrDist) Draw

func (x *FltsSctrDist) Draw(img *image.RGBA)

func (*FltsSctrDist) Flts

func (x *FltsSctrDist) Flts(clr clr.Clr, radius unt.Unt, vs ...*flts.Flts) *FltsSctrDist

func (*FltsSctrDist) HrzScl

func (x *FltsSctrDist) HrzScl(v flt.Flt) Plt

func (*FltsSctrDist) Measure

func (x *FltsSctrDist) Measure() vis.Siz

func (*FltsSctrDist) Rndr

func (x *FltsSctrDist) Rndr()

func (*FltsSctrDist) Scl

func (x *FltsSctrDist) Scl(v flt.Flt) Plt

func (*FltsSctrDist) Sho

func (x *FltsSctrDist) Sho() Plt

func (*FltsSctrDist) Siz

func (x *FltsSctrDist) Siz(w, h unt.Unt) Plt

func (*FltsSctrDist) VrtScl

func (x *FltsSctrDist) VrtScl(v flt.Flt) Plt

type FltsSctrDistScp

type FltsSctrDistScp struct {
	Idx uint32
	Arr []*FltsSctrDist
}

type FltsSctrScp

type FltsSctrScp struct {
	Idx uint32
	Arr []*FltsSctr
}

type Hrz

type Hrz struct {
	PltBse
	Plts *Plts
}

func NewHrz

func NewHrz(vs ...Plt) (r *Hrz)

func (*Hrz) Draw

func (x *Hrz) Draw(img *image.RGBA)

func (*Hrz) HrzScl

func (x *Hrz) HrzScl(v flt.Flt) Plt

func (*Hrz) Measure

func (x *Hrz) Measure() vis.Siz

func (*Hrz) Plt

func (x *Hrz) Plt(vs ...Plt) *Hrz

func (*Hrz) Rndr

func (x *Hrz) Rndr()

func (*Hrz) Scl

func (x *Hrz) Scl(v flt.Flt) Plt

func (*Hrz) Sho

func (x *Hrz) Sho() Plt

func (*Hrz) Siz

func (x *Hrz) Siz(w, h unt.Unt) Plt

func (*Hrz) VrtScl

func (x *Hrz) VrtScl(v flt.Flt) Plt

type HrzBnd

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

type HrzBndRndrSeg

type HrzBndRndrSeg struct {
	*HrzBnd
	// contains filtered or unexported fields
}

func (*HrzBndRndrSeg) Act

func (x *HrzBndRndrSeg) Act()

type HrzLn

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

type HrzLnRndrSeg

type HrzLnRndrSeg struct {
	*HrzLn
	vis.Stk
	// contains filtered or unexported fields
}

func (*HrzLnRndrSeg) Act

func (x *HrzLnRndrSeg) Act()

type HrzScp

type HrzScp struct {
	Idx uint32
	Arr []*Hrz
}

type Plt

type Plt interface {
	Measure() vis.Siz
	Rndr()
	Draw(img *image.RGBA)
	Bse() *PltBse
	Sho() Plt
	Siz(w, h unt.Unt) Plt
	Scl(v flt.Flt) Plt
	HrzScl(v flt.Flt) Plt
	VrtScl(v flt.Flt) Plt
}

type PltBse

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

func NewPltBse

func NewPltBse(slf Plt) (r PltBse)

func (*PltBse) Bse

func (x *PltBse) Bse() *PltBse

func (*PltBse) GifSav

func (x *PltBse) GifSav(path string)

func (*PltBse) GifSavOpn

func (x *PltBse) GifSavOpn(path string)

func (*PltBse) HrzScl

func (x *PltBse) HrzScl(v flt.Flt) Plt

func (*PltBse) ImgRndr

func (x *PltBse) ImgRndr() (r *image.RGBA)

func (*PltBse) PngSav

func (x *PltBse) PngSav(path string)

func (*PltBse) PngSavOpn

func (x *PltBse) PngSavOpn(path string)

func (*PltBse) Scl

func (x *PltBse) Scl(v flt.Flt) Plt

func (*PltBse) Sho

func (x *PltBse) Sho() Plt

func (*PltBse) Siz

func (x *PltBse) Siz(w, h unt.Unt) Plt

func (*PltBse) VrtScl

func (x *PltBse) VrtScl(v flt.Flt) Plt

type PltDrawSeg

type PltDrawSeg struct {
	Plt Plt
	Img *image.RGBA
}

func (*PltDrawSeg) Act

func (x *PltDrawSeg) Act()

type PltMeasureSeg

type PltMeasureSeg struct {
	Plt Plt
	Out vis.Siz
}

func (*PltMeasureSeg) Act

func (x *PltMeasureSeg) Act()

type PltRndrSeg

type PltRndrSeg struct {
	Plt Plt
}

func (*PltRndrSeg) Act

func (x *PltRndrSeg) Act()

type PltScp

type PltScp struct {
	Idx uint32
	Arr []Plt
}

type Plts

type Plts []Plt

func MakeEmpPlts

func MakeEmpPlts(cap unt.Unt) *Plts

func MakePlts

func MakePlts(cap unt.Unt) *Plts

func NewPlts

func NewPlts(vs ...Plt) *Plts

func (*Plts) At

func (x *Plts) At(idx unt.Unt) Plt

func (*Plts) Clr

func (x *Plts) Clr() *Plts

func (*Plts) Cnt

func (x *Plts) Cnt() unt.Unt

func (*Plts) Cpy

func (x *Plts) Cpy() *Plts

func (*Plts) Del

func (x *Plts) Del(idx unt.Unt) (r Plt)

func (*Plts) Dque

func (x *Plts) Dque() (r Plt)

func (*Plts) From

func (x *Plts) From(idx unt.Unt) *Plts

func (*Plts) Fst

func (x *Plts) Fst() Plt

func (*Plts) FstIdx

func (x *Plts) FstIdx() unt.Unt

func (*Plts) In

func (x *Plts) In(idx, lim unt.Unt) *Plts

func (*Plts) InBnd

func (x *Plts) InBnd(b bnd.Bnd) *Plts

func (*Plts) Ins

func (x *Plts) Ins(idx unt.Unt, elm Plt) *Plts

func (*Plts) Lst

func (x *Plts) Lst() Plt

func (*Plts) LstIdx

func (x *Plts) LstIdx() unt.Unt

func (*Plts) Mdl

func (x *Plts) Mdl() Plt

func (*Plts) MdlIdx

func (x *Plts) MdlIdx() unt.Unt

func (*Plts) Mrg

func (x *Plts) Mrg(a ...*Plts) *Plts

func (*Plts) Ok

func (x *Plts) Ok() bol.Bol

func (*Plts) Pop

func (x *Plts) Pop() (r Plt)

func (*Plts) Push

func (x *Plts) Push(a ...Plt) *Plts

func (*Plts) Que

func (x *Plts) Que(vs ...Plt) *Plts

func (*Plts) Rand

func (x *Plts) Rand() *Plts

func (*Plts) Rev

func (x *Plts) Rev() *Plts

func (*Plts) To

func (x *Plts) To(lim unt.Unt) *Plts

func (*Plts) Upd

func (x *Plts) Upd(idx unt.Unt, elm Plt) *Plts

type PltsScp

type PltsScp struct {
	Idx uint32
	Arr []*Plts
}

type Sctr

type Sctr struct {
	Y *flts.Flts
	// contains filtered or unexported fields
}

type SctrDistItm

type SctrDistItm struct {
	Vals     *flts.Flts
	ValsDist *flts.Flts
	// contains filtered or unexported fields
}

type SctrDistRndrPnt

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

func (*SctrDistRndrPnt) Act

func (x *SctrDistRndrPnt) Act()

type SctrDistRndrSeg

type SctrDistRndrSeg struct {
	bnd.Bnd
	// contains filtered or unexported fields
}

func (*SctrDistRndrSeg) Act

func (x *SctrDistRndrSeg) Act()

type SctrRndrPnt

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

func (*SctrRndrPnt) Act

func (x *SctrRndrPnt) Act()

type SctrRndrSeg

type SctrRndrSeg struct {
	bnd.Bnd
	Plt  *FltsSctr
	Sctr *Sctr
	Pnts []SctrRndrPnt
}

func (*SctrRndrSeg) Act

func (x *SctrRndrSeg) Act()

type SideFltAxisX

type SideFltAxisX struct {
	Height uint32 // total height of side (does not include border)
}

type SideFltAxisY

type SideFltAxisY struct {
	Width uint32 // total width of side (does not include border)
}
FltAxisY struct {
	Height    uint32 // pixel height of values (not including any side length, border or margin)
	PxlPerVal float32
	Min       flt.Flt
	Max       flt.Flt
	Rng       flt.Flt
	Inrvls    []flt.Flt
	Lns       []flt.Flt
	Rht       SideFltAxisY
}

type SideTmeAxisX

type SideTmeAxisX struct {
	Height uint32 // total height of side (does not include border)
}
TmeAxisX struct {
	Width     uint32 // pixel width of values (not including any margin, border or y-axis width)
	PxlPerVal float32
	Min       tme.Tme
	Max       tme.Tme
	Rng       tme.Tme
	Inrvls    []tme.Tme
	Lns       []tme.Tme
	Btm       SideTmeAxisX
}

type Stm

type Stm struct {
	TmeFltPltBse
	Title str.Str
	// contains filtered or unexported fields
}

func NewStm

func NewStm() (r *Stm)

func (*Stm) Cnd

func (x *Stm) Cnd(pen pen.Pen, cnds ...hst.Cnd) *Stm

func (*Stm) Draw

func (x *Stm) Draw(img *image.RGBA)

func (*Stm) HrzBnd

func (x *Stm) HrzBnd(fil clr.Clr, stk pen.Pen, btm, top flt.Flt) *Stm

func (*Stm) HrzLn

func (x *Stm) HrzLn(pen pen.Pen, ys ...flt.Flt) *Stm

func (*Stm) HrzScl

func (x *Stm) HrzScl(v flt.Flt) Plt

func (*Stm) HrzSclVal

func (x *Stm) HrzSclVal(val tme.Tme) *Stm

func (*Stm) Measure

func (x *Stm) Measure() vis.Siz

func (*Stm) Rndr

func (x *Stm) Rndr()

func (*Stm) Scl

func (x *Stm) Scl(v flt.Flt) Plt

func (*Stm) Sho

func (x *Stm) Sho() Plt

func (*Stm) Siz

func (x *Stm) Siz(w, h unt.Unt) Plt

func (*Stm) Stm

func (x *Stm) Stm(pen pen.Pen, stms ...hst.Stm) *Stm

func (*Stm) StmBnd

func (x *Stm) StmBnd(fil clr.Clr, stk pen.Pen, btm, top hst.Stm) *Stm

func (*Stm) VrtBnd

func (x *Stm) VrtBnd(fil clr.Clr, stk pen.Pen, lft, rht tme.Tme) *Stm

func (*Stm) VrtLn

func (x *Stm) VrtLn(pen pen.Pen, xs ...tme.Tme) *Stm

func (*Stm) VrtScl

func (x *Stm) VrtScl(v flt.Flt) Plt

func (*Stm) VrtSclVal

func (x *Stm) VrtSclVal(val flt.Flt) *Stm

func (*Stm) X

func (x *Stm) X() *TmeAxisX

func (*Stm) Y

func (x *Stm) Y() *FltAxisY

type StmBnd

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

type StmBndMeasureSeg

type StmBndMeasureSeg struct {
	*StmBnd
	// contains filtered or unexported fields
}

func (*StmBndMeasureSeg) Act

func (x *StmBndMeasureSeg) Act()

type StmBndRndrSeg

type StmBndRndrSeg struct {
	*StmBnd
	// contains filtered or unexported fields
}

func (*StmBndRndrSeg) Act

func (x *StmBndRndrSeg) Act()

type StmScp

type StmScp struct {
	Idx uint32
	Arr []*Stm
}

type StmStk

type StmStk struct {
	X *tmes.Tmes
	Y *flts.Flts
	// contains filtered or unexported fields
}

type StmStkMeasureSeg

type StmStkMeasureSeg struct {
	*StmStk
	MinY flt.Flt
	MaxY flt.Flt
}

func (*StmStkMeasureSeg) Act

func (x *StmStkMeasureSeg) Act()

type StmStkRndrSeg

type StmStkRndrSeg struct {
	*StmStk
	vis.Stk
	// contains filtered or unexported fields
}

func (*StmStkRndrSeg) Act

func (x *StmStkRndrSeg) Act()

type StmStkTrd

type StmStkTrd struct {
	X *tmes.Tmes
	Y *flts.Flts

	MinY    flt.Flt
	MaxY    flt.Flt
	OffY    flt.Flt
	BtmLenY flt.Flt
	TopLenY flt.Flt
	// contains filtered or unexported fields
}

type StmStkTrdMeasureSeg

type StmStkTrdMeasureSeg struct {
	*StmStkTrd
	RngX tme.Tme
}

func (*StmStkTrdMeasureSeg) Act

func (x *StmStkTrdMeasureSeg) Act()

type StmStkTrdRndrSeg

type StmStkTrdRndrSeg struct {
	*StmStkTrd
	vis.Stk
	// contains filtered or unexported fields
}

func (*StmStkTrdRndrSeg) Act

func (x *StmStkTrdRndrSeg) Act()

type TmeAxisX

type TmeAxisX struct {
	Width     uint32
	PxlPerVal float32
	Min       tme.Tme
	Max       tme.Tme
	Rng       tme.Tme
	Inrvls    []tme.Tme
	Lns       []tme.Tme
	Btm       SideTmeAxisX
	// contains filtered or unexported fields
}

func NewTmeAxisX

func NewTmeAxisX() (r *TmeAxisX)

func (*TmeAxisX) MeasureInrvls

func (x *TmeAxisX) MeasureInrvls(cnt unt.Unt)

func (*TmeAxisX) Pxl

func (x *TmeAxisX) Pxl(v tme.Tme) float32

func (*TmeAxisX) Vis

func (x *TmeAxisX) Vis(v bol.Bol) *TmeAxisX

type TmeFltPltBse

type TmeFltPltBse struct {
	PltBse
	// contains filtered or unexported fields
}

type Vrt

type Vrt struct {
	PltBse
	Plts *Plts
}

func NewVrt

func NewVrt(vs ...Plt) (r *Vrt)

func (*Vrt) Draw

func (x *Vrt) Draw(img *image.RGBA)

func (*Vrt) HrzScl

func (x *Vrt) HrzScl(v flt.Flt) Plt

func (*Vrt) Measure

func (x *Vrt) Measure() vis.Siz

func (*Vrt) Plt

func (x *Vrt) Plt(vs ...Plt) *Vrt

func (*Vrt) Rndr

func (x *Vrt) Rndr()

func (*Vrt) Scl

func (x *Vrt) Scl(v flt.Flt) Plt

func (*Vrt) Sho

func (x *Vrt) Sho() Plt

func (*Vrt) Siz

func (x *Vrt) Siz(w, h unt.Unt) Plt

func (*Vrt) VrtScl

func (x *Vrt) VrtScl(v flt.Flt) Plt

type VrtBnd

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

type VrtBndRndrSeg

type VrtBndRndrSeg struct {
	*VrtBnd
	// contains filtered or unexported fields
}

func (*VrtBndRndrSeg) Act

func (x *VrtBndRndrSeg) Act()

type VrtLn

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

type VrtLnRndrSeg

type VrtLnRndrSeg struct {
	*VrtLn
	vis.Stk
	// contains filtered or unexported fields
}

func (*VrtLnRndrSeg) Act

func (x *VrtLnRndrSeg) Act()

type VrtScp

type VrtScp struct {
	Idx uint32
	Arr []*Vrt
}

Jump to

Keyboard shortcuts

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