Versions in this module Expand all Collapse all v1 v1.0.0 Nov 1, 2018 Changes in this version + var CharacterWidth = map[int]float32 + var DebugLogger *log.Logger = log.New(ioutil.Discard, "", 0) + var DefaultOptions = map[PlotElement]Style + var Delta []TimeDelta = []TimeDelta + var ExpandABitFraction = 0.5 + var KeyColSep float32 = 2.0 + var KeyHorSep float32 = 1.5 + var KeyRowSep float32 = 0.75 + var KeySymbolSep float32 = 2 + var KeySymbolWidth float32 = 5 + var KeyVertSep float32 = 0.5 + var PieChartHighlight = 0.15 + var PieChartShrinkage = 0.66 + var StandardColors = []color.Color + var StandardFillFactor = 0.5 + var StandardLineStyles = []LineStyle + var StandardSymbols = []int + var Symbol = []int + var Units = []string + func AbsoluteValue(value, sum float64) (s string) + func FmtFloat(f float64) string + func FmtTime(sec int64, step TimeDelta) string + func GenericBars(bg BasicGraphics, bars []Barinfo, style Style) + func GenericBoxes(bg BasicGraphics, boxes []Box, width int, style Style) + func GenericCircle(bg BasicGraphics, x, y, r int, style Style) + func GenericKey(bg BasicGraphics, x, y int, key Key, options PlotOptions) + func GenericPath(mg MinimalGraphics, x, y []int, style Style) + func GenericRect(mg MinimalGraphics, x, y, w, h int, style Style) + func GenericRings(bg BasicGraphics, wedges []Wedgeinfo, x, y, ro, ri int, eccentricity float64) + func GenericScatter(bg BasicGraphics, points []EPoint, plotstyle PlotStyle, style Style) + func GenericSymbol(bg BasicGraphics, x, y int, style Style) + func GenericTextLen(mg MinimalGraphics, t string, font Font) (width int) + func GenericWedge(mg MinimalGraphics, x, y, ro, ri int, phi, psi, ecc float64, style Style) + func GenericXAxis(bg BasicGraphics, rng Range, y, ym int, options PlotOptions) + func GenericYAxis(bg BasicGraphics, rng Range, x, xm int, options PlotOptions) + func IntegerValue(value, sum float64) (s string) + func NextSymbol(s int) int + func PercentValue(value, sum float64) (s string) + func PercentilInt(data []int, p int) int + func RoundDown(t time.Time, d TimeDelta) time.Time + func RoundNext(t time.Time, d TimeDelta) time.Time + func RoundUp(t time.Time, d TimeDelta) time.Time + func SanitizeRect(x, y, w, h, r int) (int, int, int, int) + func SixvalFloat64(data []float64, p int) (min, lq, med, avg, uq, max float64) + func SixvalInt(data []int, p int) (min, lq, med, avg, uq, max int) + func SymbolIndex(s int) (idx int) + type BarChart struct + BarWidthFac float64 + Data []BarChartData + Horizontal bool + Key Key + Options PlotOptions + SameBarWidth bool + ShowVal int + Stacked bool + Title string + XRange Range + YRange Range + func (c *BarChart) AddData(name string, data []Point, style Style) + func (c *BarChart) AddDataPair(name string, x, y []float64, style Style) + func (c *BarChart) Plot(g Graphics) + func (c *BarChart) Reset() + type BarChartData struct + Name string + Samples []Point + Style Style + type Barinfo struct + type BasicGraphics interface + Options func() PlotOptions + Path func(x, y []int, style Style) + Rect func(x, y, w, h int, style Style) + Symbol func(x, y int, style Style) + Wedge func(x, y, ro, ri int, phi, psi float64, style Style) + type Box struct + Avg float64 + High float64 + Low float64 + Med float64 + Outliers []float64 + Q1 float64 + Q3 float64 + X float64 + func (p Box) XErr() float64 + func (p Box) XVal() float64 + func (p Box) YErr() float64 + func (p Box) YVal() float64 + type BoxChart struct + Data []BoxChartData + Key Key + Options PlotOptions + Title string + XRange Range + YRange Range + func (c *BoxChart) AddData(name string, data []Box, style Style) + func (c *BoxChart) AddSet(x float64, data []float64, outlier bool) + func (c *BoxChart) NextDataSet(name string, style Style) + func (c *BoxChart) Plot(g Graphics) + func (c *BoxChart) Reset() + type BoxChartData struct + Name string + Samples []Box + Style Style + type CatValue struct + Cat string + Flag bool + Val float64 + func (c CatValue) Category() string + func (c CatValue) Flaged() bool + func (c CatValue) Value() float64 + type CategoryChartData struct + Name string + Samples []CatValue + Style []Style + type CategoryValue interface + Category func() string + Flaged func() bool + Value func() float64 + type Chart interface + Plot func(g Graphics) + Reset func() + type Day struct + Num int + func (d Day) Format(t time.Time) string + func (d Day) Period() bool + func (d Day) RoundDown(t time.Time) time.Time + func (d Day) Seconds() int64 + func (d Day) String() string + type EPoint struct + DeltaX float64 + DeltaY float64 + OffX float64 + OffY float64 + X float64 + Y float64 + func (p EPoint) BoundingBox() (xl, yl, xh, yh float64) + func (p EPoint) XErr() (float64, float64) + func (p EPoint) XVal() float64 + func (p EPoint) YErr() (float64, float64) + func (p EPoint) YVal() float64 + type Expansion int + const ExpandABit + const ExpandNextTic + const ExpandTight + const ExpandToTic + type Font struct + Color color.Color + Name string + Size FontSize + type FontSize int + const HugeFontSize + const LargeFontSize + const NormalFontSize + const SmallFontSize + const TinyFontSize + type Graphics interface + Bars func(bars []Barinfo, style Style) + Begin func() + Boxes func(boxes []Box, width int, style Style) + Dimensions func() (int, int) + End func() + Key func(x, y int, key Key, options PlotOptions) + Rings func(wedeges []Wedgeinfo, x, y, ro, ri int) + Scatter func(points []EPoint, plotstyle PlotStyle, style Style) + XAxis func(xr Range, ys, yms int, options PlotOptions) + YAxis func(yr Range, xs, xms int, options PlotOptions) + type GridMode int + const GridBlocks + const GridLines + const GridOff + type HistChart struct + BinWidth float64 + Counts bool + Data []HistChartData + FirstBin float64 + Gap float64 + Kernel Kernel + Key Key + Options PlotOptions + Sep float64 + Shifted bool + Stacked bool + TBinWidth TimeDelta + Title string + XRange Range + YRange Range + func (c *HistChart) AddData(name string, data []float64, style Style) + func (c *HistChart) AddDataGeneric(name string, data []Value, style Style) + func (c *HistChart) AddDataInt(name string, data []int, style Style) + func (c *HistChart) Plot(g Graphics) + func (c *HistChart) Reset() + type HistChartData struct + Name string + Samples []float64 + Style Style + type Hour struct + Num int + func (h Hour) Format(t time.Time) string + func (h Hour) Period() bool + func (h Hour) RoundDown(t time.Time) time.Time + func (h Hour) Seconds() int64 + func (h Hour) String() string + type Kernel func(x float64) float64 + var BisquareKernel Kernel = func(x float64) float64 { ... } + var EpanechnikovKernel Kernel = func(x float64) float64 { ... } + var GaussKernel Kernel = func(x float64) float64 { ... } + var RectangularKernel = func(x float64) float64 { ... } + var TriangularKernel = func(x float64) float64 { ... } + var TriweightKernel Kernel = func(x float64) float64 { ... } + type Key struct + Border int + Cols int + Entries []KeyEntry + Hide bool + Pos string + X int + Y int + func (key Key) Layout(bg BasicGraphics, m [][]*KeyEntry, font Font) (w, h int, colwidth, rowheight []int) + func (key Key) Place() (matrix [][]*KeyEntry) + type KeyEntry struct + PlotStyle PlotStyle + Style Style + Text string + type LayoutData struct + Height int + KeyX int + KeyY int + Left int + NumXtics int + NumYtics int + Top int + Width int + type LineStyle int + const DashDotDotLine + const DashedLine + const DottedLine + const LongDashLine + const LongDotLine + const SolidLine + type MinimalGraphics interface + Background func() (r, g, b, a uint8) + FontMetrics func(font Font) (fw float32, fh int, mono bool) + Line func(x0, y0, x1, y1 int, style Style) + Text func(x, y int, t string, align string, rot int, f Font) + TextLen func(t string, font Font) int + type Minute struct + Num int + func (m Minute) Format(t time.Time) string + func (m Minute) Period() bool + func (m Minute) RoundDown(t time.Time) time.Time + func (m Minute) Seconds() int64 + func (m Minute) String() string + type MirrorAxis int + const MirrorAxisAndTics + const MirrorAxisOnly + const MirrorNothing + type Month struct + Num int + func (m Month) Format(t time.Time) string + func (m Month) Period() bool + func (m Month) RoundDown(t time.Time) time.Time + func (m Month) Seconds() int64 + func (m Month) String() string + type PieChart struct + Data []CategoryChartData + FmtKey func(value, sume float64) string + FmtVal func(value, sume float64) string + Inner float64 + Key Key + Options PlotOptions + Title string + func (c *PieChart) AddData(name string, data []CatValue, style []Style) + func (c *PieChart) AddDataPair(name string, cat []string, val []float64) + func (c *PieChart) AddIntDataPair(name string, cat []string, val []int) + func (c *PieChart) Plot(g Graphics) + func (c *PieChart) Reset() + type PlotElement int + const GridBlockElement + const GridLineElement + const KeyElement + const MajorAxisElement + const MajorTicElement + const MinorAxisElement + const MinorTicElement + const RangeLimitElement + const TitleElement + const ZeroAxisElement + type PlotOptions map[PlotElement]Style + type PlotStyle int + const PlotStyleBox + const PlotStyleLines + const PlotStyleLinesPoints + const PlotStylePoints + type Point struct + X float64 + Y float64 + func (p Point) XErr() (float64, float64) + func (p Point) XVal() float64 + func (p Point) YErr() (float64, float64) + func (p Point) YVal() float64 + type Range struct + Category []string + Data2Screen func(float64) int + DataMax float64 + DataMin float64 + InvNorm func(float64) float64 + Label string + Log bool + Max float64 + MaxMode RangeMode + Min float64 + MinMode RangeMode + Norm func(float64) float64 + Screen2Data func(int) float64 + ShowLimits bool + ShowZero bool + TMax time.Time + TMin time.Time + TicSetting TicSetting + Tics []Tic + Time bool + func (r *Range) Fixed(min, max, delta float64) + func (r *Range) Init() + func (r *Range) Reset() + func (r *Range) Setup(desiredNumberOfTics, maxNumberOfTics, sWidth, sOffset int, revert bool) + func (r *Range) TFixed(min, max time.Time, delta TimeDelta) + type RangeMode struct + Constrained bool + Expand Expansion + Fixed bool + Lower float64 + TLower time.Time + TUpper time.Time + TValue time.Time + Upper float64 + Value float64 + type Real float64 + func (r Real) XVal() float64 + type ScatterChart struct + Data []ScatterChartData + Key Key + NSamples int + Options PlotOptions + Title string + XRange Range + YRange Range + func (c *ScatterChart) AddData(name string, data []EPoint, plotstyle PlotStyle, style Style) + func (c *ScatterChart) AddDataGeneric(name string, data []XYErrValue, plotstyle PlotStyle, style Style) + func (c *ScatterChart) AddDataPair(name string, x, y []float64, plotstyle PlotStyle, style Style) + func (c *ScatterChart) AddFunc(name string, f func(float64) float64, plotstyle PlotStyle, style Style) + func (c *ScatterChart) Plot(g Graphics) + func (c *ScatterChart) Reset() + type ScatterChartData struct + Func func(float64) float64 + Name string + PlotStyle PlotStyle + Samples []EPoint + Style Style + type Second struct + Num int + func (s Second) Format(t time.Time) string + func (s Second) Period() bool + func (s Second) RoundDown(t time.Time) time.Time + func (s Second) Seconds() int64 + func (s Second) String() string + type StripChart struct + Jitter bool + func (sc *StripChart) AddData(name string, data []float64, style Style) + func (sc *StripChart) AddDataGeneric(name string, data []Value) + func (sc *StripChart) Plot(g Graphics) + func (sc *StripChart) Reset() + type Style struct + FillColor color.Color + Font Font + LineColor color.Color + LineStyle LineStyle + LineWidth int + Symbol int + SymbolColor color.Color + SymbolSize float64 + func AutoStyle(i int, fill bool) (style Style) + func ElementStyle(options PlotOptions, element PlotElement) Style + type Tic struct + Align int + Label string + LabelPos float64 + Pos float64 + type TicSetting struct + Delta float64 + Format func(float64) string + Grid GridMode + Hide bool + HideLabels bool + Minor int + Mirror MirrorAxis + TDelta TimeDelta + TFormat func(time.Time, TimeDelta) string + TLocation *time.Location + Tics int + UserDelta bool + type TimeDelta interface + Format func(t time.Time) string + Period func() bool + RoundDown func(t time.Time) time.Time + Seconds func() int64 + String func() string + func MatchingTimeDelta(delta float64, fac float64) TimeDelta + func NextTimeDelta(d TimeDelta) TimeDelta + type Value interface + XVal func() float64 + type Wedgeinfo struct + Font Font + Phi float64 + Psi float64 + Shift int + Style Style + Text string + Tp string + type Week struct + Num int + func (w Week) Format(t time.Time) string + func (w Week) Period() bool + func (w Week) RoundDown(t time.Time) time.Time + func (w Week) Seconds() int64 + func (w Week) String() string + type XYErrValue interface + XErr func() (float64, float64) + XVal func() float64 + YErr func() (float64, float64) + YVal func() float64 + type XYValue interface + XVal func() float64 + YVal func() float64 + type Year struct + Num int + func (y Year) Format(t time.Time) string + func (y Year) Period() bool + func (y Year) RoundDown(t time.Time) time.Time + func (y Year) Seconds() int64 + func (y Year) String() string