MCPcopy Index your code
hub / github.com/gonum/plot / Thumbnail

Method Thumbnail

plotter/barchart.go:198–211  ·  view source on GitHub ↗

Thumbnail fulfills the plot.Thumbnailer interface.

(c *draw.Canvas)

Source from the content-addressed store, hash-verified

196
197// Thumbnail fulfills the plot.Thumbnailer interface.
198func (b *BarChart) Thumbnail(c *draw.Canvas) {
199 pts := []vg.Point{
200 {X: c.Min.X, Y: c.Min.Y},
201 {X: c.Min.X, Y: c.Max.Y},
202 {X: c.Max.X, Y: c.Max.Y},
203 {X: c.Max.X, Y: c.Min.Y},
204 }
205 poly := c.ClipPolygonY(pts)
206 c.FillPolygon(b.Color, poly)
207
208 pts = append(pts, vg.Point{X: c.Min.X, Y: c.Min.Y})
209 outline := c.ClipLinesY(pts)
210 c.StrokeLines(b.LineStyle, outline...)
211}

Callers

nothing calls this directly

Calls 4

ClipPolygonYMethod · 0.80
FillPolygonMethod · 0.80
ClipLinesYMethod · 0.80
StrokeLinesMethod · 0.80

Tested by

no test coverage detected