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

Method Plot

plotter/image.go:55–66  ·  view source on GitHub ↗

Plot implements the Plot method of the plot.Plotter interface.

(c draw.Canvas, p *plot.Plot)

Source from the content-addressed store, hash-verified

53
54// Plot implements the Plot method of the plot.Plotter interface.
55func (img *Image) Plot(c draw.Canvas, p *plot.Plot) {
56 trX, trY := p.Transforms(&c)
57 xmin := trX(img.xmin)
58 ymin := trY(img.ymin)
59 xmax := trX(img.xmax)
60 ymax := trY(img.ymax)
61 rect := vg.Rectangle{
62 Min: vg.Point{X: xmin, Y: ymin},
63 Max: vg.Point{X: xmax, Y: ymax},
64 }
65 c.DrawImage(rect, img.transformFor(p))
66}
67
68// DataRange implements the DataRange method
69// of the plot.DataRanger interface.

Callers 2

plotRasterizedMethod · 0.95
PlotMethod · 0.95

Calls 3

transformForMethod · 0.95
TransformsMethod · 0.80
DrawImageMethod · 0.65

Tested by

no test coverage detected