Versions in this module Expand all Collapse all v0 v0.0.2 Mar 5, 2022 v0.0.1 Mar 5, 2022 Changes in this version + var DefaultCapWidth = vg.Points(5) + var DefaultFont = plot.DefaultFont + var DefaultFontSize = vg.Points(10) + var DefaultGlyphStyle = draw.GlyphStyle + var DefaultGridLineStyle = draw.LineStyle + var DefaultLineStyle = draw.LineStyle + var DefaultQuartMedianStyle = draw.GlyphStyle + var DefaultQuartWhiskerStyle = draw.LineStyle + var ErrInfinity = errors.New("plotter: infinite data point") + var ErrNaN = errors.New("plotter: NaN data point") + var ErrNoData = errors.New("plotter: no data points") + func CheckFloats(fs ...float64) error + func NewLinePoints(xys XYer) (*Line, *Scatter, error) + func PaletteThumbnailers(p palette.Palette) []plot.Thumbnailer + func Range(vs Valuer) (min, max float64) + func XYRange(xys XYer) (xmin, xmax, ymin, ymax float64) + type BarChart struct + Color color.Color + Horizontal bool + Offset vg.Length + Width vg.Length + XMin float64 + func NewBarChart(vs Valuer, width vg.Length) (*BarChart, error) + func (b *BarChart) BarHeight(i int) float64 + func (b *BarChart) DataRange() (xmin, xmax, ymin, ymax float64) + func (b *BarChart) GlyphBoxes(plt *plot.Plot) []plot.GlyphBox + func (b *BarChart) Plot(c draw.Canvas, plt *plot.Plot) + func (b *BarChart) StackOn(on *BarChart) + func (b *BarChart) Thumbnail(c *draw.Canvas) + type BoxPlot struct + BoxStyle draw.LineStyle + CapWidth vg.Length + FillColor color.Color + GlyphStyle draw.GlyphStyle + Horizontal bool + MedianStyle draw.LineStyle + Offset vg.Length + WhiskerStyle draw.LineStyle + Width vg.Length + func NewBoxPlot(w vg.Length, loc float64, values Valuer) (*BoxPlot, error) + func (b *BoxPlot) DataRange() (float64, float64, float64, float64) + func (b *BoxPlot) GlyphBoxes(plt *plot.Plot) []plot.GlyphBox + func (b *BoxPlot) OutsideLabels(labels Labeller) (*Labels, error) + func (b *BoxPlot) Plot(c draw.Canvas, plt *plot.Plot) + type ColorBar struct + ColorMap palette.ColorMap + Colors int + Vertical bool + func (l *ColorBar) DataRange() (xmin, xmax, ymin, ymax float64) + func (l *ColorBar) Plot(c draw.Canvas, p *plot.Plot) + type Contour struct + GridXYZ GridXYZ + Levels []float64 + LineStyles []draw.LineStyle + Max float64 + Min float64 + Overflow color.Color + Palette palette.Palette + Underflow color.Color + func NewContour(g GridXYZ, levels []float64, p palette.Palette) *Contour + func (h *Contour) DataRange() (xmin, xmax, ymin, ymax float64) + func (h *Contour) GlyphBoxes(plt *plot.Plot) []plot.GlyphBox + func (h *Contour) Plot(c draw.Canvas, plt *plot.Plot) + type Errors []struct + type Field struct + DrawGlyph func(c vg.Canvas, sty draw.LineStyle, v XY) + FieldXY FieldXY + LineStyle draw.LineStyle + func NewField(f FieldXY) *Field + func (f *Field) DataRange() (xmin, xmax, ymin, ymax float64) + func (f *Field) GlyphBoxes(plt *plot.Plot) []plot.GlyphBox + func (f *Field) Plot(c draw.Canvas, plt *plot.Plot) + type FieldXY interface + Dims func() (c, r int) + Vector func(c, r int) XY + X func(c int) float64 + Y func(r int) float64 + type Flow struct + Group string + ReceptorCategory int + ReceptorLabel string + SourceCategory int + SourceLabel string + Value float64 + type Function struct + F func(x float64) (y float64) + Samples int + XMax float64 + XMin float64 + func NewFunction(f func(float64) float64) *Function + func (f *Function) Plot(c draw.Canvas, p *plot.Plot) + func (f Function) Thumbnail(c *draw.Canvas) + type GlyphBoxes struct + func NewGlyphBoxes() *GlyphBoxes + func (g GlyphBoxes) Plot(c draw.Canvas, plt *plot.Plot) + type Grid struct + Horizontal draw.LineStyle + Vertical draw.LineStyle + func NewGrid() *Grid + func (g *Grid) Plot(c draw.Canvas, plt *plot.Plot) + type GridXYZ interface + Dims func() (c, r int) + X func(c int) float64 + Y func(r int) float64 + Z func(c, r int) float64 + type HeatMap struct + GridXYZ GridXYZ + Max float64 + Min float64 + NaN color.Color + Overflow color.Color + Palette palette.Palette + Rasterized bool + Underflow color.Color + func NewHeatMap(g GridXYZ, p palette.Palette) *HeatMap + func (h *HeatMap) DataRange() (xmin, xmax, ymin, ymax float64) + func (h *HeatMap) GlyphBoxes(plt *plot.Plot) []plot.GlyphBox + func (h *HeatMap) Plot(c draw.Canvas, plt *plot.Plot) + type Histogram struct + Bins []HistogramBin + FillColor color.Color + LogY bool + Width float64 + func NewHist(vs Valuer, n int) (*Histogram, error) + func NewHistogram(xy XYer, n int) (*Histogram, error) + func (h *Histogram) DataRange() (xmin, xmax, ymin, ymax float64) + func (h *Histogram) Normalize(sum float64) + func (h *Histogram) Plot(c draw.Canvas, p *plot.Plot) + func (h *Histogram) Thumbnail(c *draw.Canvas) + type HistogramBin struct + Max float64 + Min float64 + Weight float64 + type Image struct + func NewImage(img image.Image, xmin, ymin, xmax, ymax float64) *Image + func (img *Image) DataRange() (xmin, xmax, ymin, ymax float64) + func (img *Image) GlyphBoxes(plt *plot.Plot) []plot.GlyphBox + func (img *Image) Plot(c draw.Canvas, p *plot.Plot) + type Labeller interface + Label func(int) string + type Labels struct + Labels []string + Offset vg.Point + TextStyle []text.Style + func NewLabels(d XYLabeller) (*Labels, error) + func (l *Labels) DataRange() (xmin, xmax, ymin, ymax float64) + func (l *Labels) GlyphBoxes(p *plot.Plot) []plot.GlyphBox + func (l *Labels) Plot(c draw.Canvas, p *plot.Plot) + type Line struct + FillColor color.Color + StepStyle StepKind + func NewLine(xys XYer) (*Line, error) + func (pts *Line) DataRange() (xmin, xmax, ymin, ymax float64) + func (pts *Line) Plot(c draw.Canvas, plt *plot.Plot) + func (pts *Line) Thumbnail(c *draw.Canvas) + type Polygon struct + Color color.Color + XYs []XYs + func NewPolygon(xys ...XYer) (*Polygon, error) + func (pts *Polygon) DataRange() (xmin, xmax, ymin, ymax float64) + func (pts *Polygon) Plot(c draw.Canvas, plt *plot.Plot) + func (pts *Polygon) Thumbnail(c *draw.Canvas) + type QuartPlot struct + Horizontal bool + MedianStyle draw.GlyphStyle + Offset vg.Length + WhiskerStyle draw.LineStyle + func NewQuartPlot(loc float64, values Valuer) (*QuartPlot, error) + func (b *QuartPlot) DataRange() (float64, float64, float64, float64) + func (b *QuartPlot) GlyphBoxes(plt *plot.Plot) []plot.GlyphBox + func (b *QuartPlot) OutsideLabels(labels Labeller) (*Labels, error) + func (b *QuartPlot) Plot(c draw.Canvas, plt *plot.Plot) + type Sankey struct + Color color.Color + FlowStyle func(group string) (color.Color, draw.LineStyle) + LineStyle draw.LineStyle + StockBarWidth vg.Length + StockStyle func(label string, category int) (lbl string, ts text.Style, xOff, yOff vg.Length, c color.Color, ...) + TextStyle text.Style + func NewSankey(flows ...Flow) (*Sankey, error) + func (s *Sankey) DataRange() (xmin, xmax, ymin, ymax float64) + func (s *Sankey) GlyphBoxes(plt *plot.Plot) []plot.GlyphBox + func (s *Sankey) Plot(c draw.Canvas, plt *plot.Plot) + func (s *Sankey) StockRange(label string, category int) (min, max float64, err error) + func (s *Sankey) Thumbnailers() (legendLabels []string, thumbnailers []plot.Thumbnailer) + type Scatter struct + GlyphStyleFunc func(int) draw.GlyphStyle + func NewScatter(xys XYer) (*Scatter, error) + func (pts *Scatter) DataRange() (xmin, xmax, ymin, ymax float64) + func (pts *Scatter) GlyphBoxes(plt *plot.Plot) []plot.GlyphBox + func (pts *Scatter) Plot(c draw.Canvas, plt *plot.Plot) + func (pts *Scatter) Thumbnail(c *draw.Canvas) + type StepKind int + const MidStep + const NoStep + const PostStep + const PreStep + type ValueLabels []struct + func (vs ValueLabels) Label(i int) string + func (vs ValueLabels) Len() int + func (vs ValueLabels) Value(i int) float64 + type Valuer interface + Len func() int + Value func(int) float64 + type Values []float64 + func CopyValues(vs Valuer) (Values, error) + func (vs Values) Len() int + func (vs Values) Value(i int) float64 + type XErrorBars struct + CapWidth vg.Length + func NewXErrorBars(xerrs interface{ ... }) (*XErrorBars, error) + func (e *XErrorBars) DataRange() (xmin, xmax, ymin, ymax float64) + func (e *XErrorBars) GlyphBoxes(plt *plot.Plot) []plot.GlyphBox + func (e *XErrorBars) Plot(c draw.Canvas, p *plot.Plot) + type XErrorer interface + XError func(int) (float64, float64) + type XErrors Errors + func (xe XErrors) XError(i int) (float64, float64) + type XValues struct + func (xs XValues) Value(i int) float64 + type XY struct + X float64 + Y float64 + type XYLabeller interface + type XYLabels struct + Labels []string + func (l XYLabels) Label(i int) string + type XYValues struct + func (xy XYValues) XY(i int) (float64, float64) + type XYZ struct + X float64 + Y float64 + Z float64 + type XYZer interface + Len func() int + XY func(int) (float64, float64) + XYZ func(int) (float64, float64, float64) + type XYZs []XYZ + func CopyXYZs(data XYZer) (XYZs, error) + func (xyz XYZs) Len() int + func (xyz XYZs) XY(i int) (float64, float64) + func (xyz XYZs) XYZ(i int) (float64, float64, float64) + type XYer interface + Len func() int + XY func(int) (x, y float64) + type XYs []XY + func CopyXYs(data XYer) (XYs, error) + func (xys XYs) Len() int + func (xys XYs) XY(i int) (float64, float64) + type YErrorBars struct + CapWidth vg.Length + func NewYErrorBars(yerrs interface{ ... }) (*YErrorBars, error) + func (e *YErrorBars) DataRange() (xmin, xmax, ymin, ymax float64) + func (e *YErrorBars) GlyphBoxes(plt *plot.Plot) []plot.GlyphBox + func (e *YErrorBars) Plot(c draw.Canvas, p *plot.Plot) + type YErrorer interface + YError func(int) (float64, float64) + type YErrors Errors + func (ye YErrors) YError(i int) (float64, float64) + type YValues struct + func (ys YValues) Value(i int) float64