MCPcopy Create free account
hub / github.com/cogentcore/core / SVGString

Method SVGString

plot/draw.go:24–30  ·  view source on GitHub ↗

SVGString returns an SVG representation of the plot as a string

()

Source from the content-addressed store, hash-verified

22
23// SVGString returns an SVG representation of the plot as a string
24func (pt *Plot) SVGString() string {
25 b := &bytes.Buffer{}
26 pt.Paint.SVGOut = b
27 pt.svgDraw()
28 pt.Paint.SVGOut = nil
29 return b.String()
30}
31
32// svgDraw draws SVGOut writer that must already be set in Paint
33func (pt *Plot) svgDraw() {

Callers

nothing calls this directly

Calls 2

svgDrawMethod · 0.95
StringMethod · 0.95

Tested by

no test coverage detected